[Pgpool-general] pool_check_fd: data is not ready tp->tv_sec5tp->tp_usec 5000000

Aaron aaron at mtu.net
Wed Sep 28 12:30:03 GMT 2005


Debug Output:

test-adxi:~# pgpool -dn
2005-09-28 08:27:29 DEBUG: pid 8783: key: listen_addresses
2005-09-28 08:27:29 DEBUG: pid 8783: value: '*' kind: 4
2005-09-28 08:27:29 DEBUG: pid 8783: key: port
2005-09-28 08:27:29 DEBUG: pid 8783: value: 5432 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: backend_host_name
2005-09-28 08:27:29 DEBUG: pid 8783: value: 'test-pgsql-a.internal.autoweb.net' kind: 4
2005-09-28 08:27:29 DEBUG: pid 8783: :test-pgsql-a.internal.autoweb.net:
2005-09-28 08:27:29 DEBUG: pid 8783: key: backend_port
2005-09-28 08:27:29 DEBUG: pid 8783: value: 5432 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: secondary_backend_host_name
2005-09-28 08:27:29 DEBUG: pid 8783: value: 'test-pgsql-b' kind: 4
2005-09-28 08:27:29 DEBUG: pid 8783: :test-pgsql-b:
2005-09-28 08:27:29 DEBUG: pid 8783: key: secondary_backend_port
2005-09-28 08:27:29 DEBUG: pid 8783: value: 5432 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: num_init_children
2005-09-28 08:27:29 DEBUG: pid 8783: value: 32 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: max_pool
2005-09-28 08:27:29 DEBUG: pid 8783: value: 4 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: child_life_time
2005-09-28 08:27:29 DEBUG: pid 8783: value: 300 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: connection_life_time
2005-09-28 08:27:29 DEBUG: pid 8783: value: 0 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: logdir
2005-09-28 08:27:29 DEBUG: pid 8783: value: '/var/run/postgresql' kind: 4
2005-09-28 08:27:29 DEBUG: pid 8783: key: replication_mode
2005-09-28 08:27:29 DEBUG: pid 8783: value: false kind: 1
2005-09-28 08:27:29 DEBUG: pid 8783: key: replication_strict
2005-09-28 08:27:29 DEBUG: pid 8783: value: true kind: 1
2005-09-28 08:27:29 DEBUG: pid 8783: key: replication_timeout
2005-09-28 08:27:29 DEBUG: pid 8783: value: 5000 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: load_balance_mode
2005-09-28 08:27:29 DEBUG: pid 8783: value: false kind: 1
2005-09-28 08:27:29 DEBUG: pid 8783: key: weight_master
2005-09-28 08:27:29 DEBUG: pid 8783: value: 0.5 kind: 3
2005-09-28 08:27:29 DEBUG: pid 8783: weight_master: 0.500000
2005-09-28 08:27:29 DEBUG: pid 8783: key: weight_secondary
2005-09-28 08:27:29 DEBUG: pid 8783: value: 0.5 kind: 3
2005-09-28 08:27:29 DEBUG: pid 8783: weight_secondary: 0.500000
2005-09-28 08:27:29 DEBUG: pid 8783: key: replication_stop_on_mismatch
2005-09-28 08:27:29 DEBUG: pid 8783: value: false kind: 1
2005-09-28 08:27:29 DEBUG: pid 8783: replication_stop_on_mismatch: 0
2005-09-28 08:27:29 DEBUG: pid 8783: key: reset_query_list
2005-09-28 08:27:29 DEBUG: pid 8783: value: 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT' kind: 4
2005-09-28 08:27:29 DEBUG: pid 8783: extract_string_tokens: token: ABORT
2005-09-28 08:27:29 DEBUG: pid 8783: extract_string_tokens: token:  RESET ALL
2005-09-28 08:27:29 DEBUG: pid 8783: extract_string_tokens: token:  SET SESSION AUTHORIZATION DEFAULT
2005-09-28 08:27:29 DEBUG: pid 8783: key: print_timestamp
2005-09-28 08:27:29 DEBUG: pid 8783: value: true kind: 1
2005-09-28 08:27:29 DEBUG: pid 8783: key: master_slave_mode
2005-09-28 08:27:29 DEBUG: pid 8783: value: true kind: 1
2005-09-28 08:27:29 DEBUG: pid 8783: key: connection_cache
2005-09-28 08:27:29 DEBUG: pid 8783: value: true kind: 1
2005-09-28 08:27:29 DEBUG: pid 8783: key: health_check_timeout
2005-09-28 08:27:29 DEBUG: pid 8783: value: 60 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: health_check_period
2005-09-28 08:27:29 DEBUG: pid 8783: value: 60 kind: 2
2005-09-28 08:27:29 DEBUG: pid 8783: key: health_check_user
2005-09-28 08:27:29 DEBUG: pid 8783: value: 'postgres' kind: 4
2005-09-28 08:27:29 DEBUG: pid 8783: key: insert_lock
2005-09-28 08:27:29 DEBUG: pid 8783: value: false kind: 1
2005-09-28 08:27:29 DEBUG: pid 8783: weight: 1073741823
2005-09-28 08:27:29 DEBUG: pid 8784: I am 8784
2005-09-28 08:27:29 DEBUG: pid 8785: I am 8785
2005-09-28 08:27:29 DEBUG: pid 8786: I am 8786
2005-09-28 08:27:29 DEBUG: pid 8787: I am 8787
2005-09-28 08:27:29 DEBUG: pid 8788: I am 8788
2005-09-28 08:27:29 DEBUG: pid 8789: I am 8789
2005-09-28 08:27:29 DEBUG: pid 8790: I am 8790
2005-09-28 08:27:29 DEBUG: pid 8791: I am 8791
2005-09-28 08:27:29 DEBUG: pid 8792: I am 8792
2005-09-28 08:27:29 DEBUG: pid 8793: I am 8793
2005-09-28 08:27:29 DEBUG: pid 8794: I am 8794
2005-09-28 08:27:29 DEBUG: pid 8795: I am 8795
2005-09-28 08:27:29 DEBUG: pid 8796: I am 8796
2005-09-28 08:27:29 DEBUG: pid 8797: I am 8797
2005-09-28 08:27:29 DEBUG: pid 8798: I am 8798
2005-09-28 08:27:29 DEBUG: pid 8799: I am 8799
2005-09-28 08:27:29 DEBUG: pid 8800: I am 8800
2005-09-28 08:27:29 DEBUG: pid 8801: I am 8801
2005-09-28 08:27:29 DEBUG: pid 8802: I am 8802
2005-09-28 08:27:29 DEBUG: pid 8803: I am 8803
2005-09-28 08:27:29 DEBUG: pid 8804: I am 8804
2005-09-28 08:27:29 DEBUG: pid 8805: I am 8805
2005-09-28 08:27:29 DEBUG: pid 8806: I am 8806
2005-09-28 08:27:29 DEBUG: pid 8807: I am 8807
2005-09-28 08:27:29 DEBUG: pid 8808: I am 8808
2005-09-28 08:27:29 DEBUG: pid 8809: I am 8809
2005-09-28 08:27:29 DEBUG: pid 8810: I am 8810
2005-09-28 08:27:29 DEBUG: pid 8811: I am 8811
2005-09-28 08:27:29 DEBUG: pid 8812: I am 8812
2005-09-28 08:27:29 DEBUG: pid 8813: I am 8813
2005-09-28 08:27:29 DEBUG: pid 8814: I am 8814
2005-09-28 08:27:29 DEBUG: pid 8815: I am 8815
2005-09-28 08:27:29 LOG:   pid 8783: pgpool successfully started
2005-09-28 08:27:29 LOG:   pid 8783: starting health checking
2005-09-28 08:27:34 DEBUG: pid 8815: I am 8815 accept fd 6
2005-09-28 08:27:34 DEBUG: pid 8815: Protocol Major: 3 Minor: 0 database: adx user: agm
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 8
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length2: master lenghth: 28
2005-09-28 08:27:34 DEBUG: pid 8815: name: client_encoding value: UNICODE
2005-09-28 08:27:34 DEBUG: pid 8815: secondary name: client_encoding value: UNICODE
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length2: master lenghth: 23
2005-09-28 08:27:34 DEBUG: pid 8815: name: DateStyle value: ISO, MDY
2005-09-28 08:27:34 DEBUG: pid 8815: secondary name: DateStyle value: ISO, MDY
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length2: master lenghth: 21
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length2: length does not match between backends master(21) secondary(20)
2005-09-28 08:27:34 DEBUG: pid 8815: name: is_superuser value: off
2005-09-28 08:27:34 DEBUG: pid 8815: secondary name: is_superuser value: on
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length2: master lenghth: 25
2005-09-28 08:27:34 DEBUG: pid 8815: name: server_version value: 7.4.7
2005-09-28 08:27:34 DEBUG: pid 8815: secondary name: server_version value: 7.4.7
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length2: master lenghth: 30
2005-09-28 08:27:34 DEBUG: pid 8815: name: session_authorization value: agm
2005-09-28 08:27:34 DEBUG: pid 8815: secondary name: session_authorization value: agm
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 12
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 154
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: I
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend Q(51)
2005-09-28 08:27:34 DEBUG: pid 8815: Query: SELECT version(), 'DBD::Pg'
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend T
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: T
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data D len: 139 po: 60
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: D
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data C len: 17 po: 182
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: C
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 194
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: I
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend Q(51)
2005-09-28 08:27:34 DEBUG: pid 8815: Query: begin
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend C
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: C
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 11
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: T
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend Q(51)
2005-09-28 08:27:34 DEBUG: pid 8815: Query: SELECT MIN(rid) FROM transaction_receivers
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend T
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: T
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data D len: 29 po: 29
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: D
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data C len: 17 po: 41
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: C
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 53
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: T
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend Q(51)
2005-09-28 08:27:34 DEBUG: pid 8815: Query: rollback
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend C
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: C
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 14
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: I
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend Q(51)
2005-09-28 08:27:34 DEBUG: pid 8815: Query: begin
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend C
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: C
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 11
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: T
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend Q(51)
2005-09-28 08:27:34 DEBUG: pid 8815: Query: INSERT INTO trans_pending (transid, oemid, oemstring, rid, filenum) VALUES('TEST124', 'TESTOEM124', 'gcx', '1', NULL)
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend C
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: C
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 23
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: T
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend Q(51)
2005-09-28 08:27:34 DEBUG: pid 8815: Query: rollback
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend C
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: C
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 14
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: I
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend Q(51)
2005-09-28 08:27:34 DEBUG: pid 8815: Query: begin
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend C
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: C
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 11
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: T
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend Q(51)
2005-09-28 08:27:34 DEBUG: pid 8815: Query: PREPARE dbdpg_1(varchar,varchar,varchar,int4,int4) AS INSERT INTO trans_pending (transid, oemid, oemstring, rid, filenum) VALUES($1, $2, $3, $4, $5)
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend C
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: C
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend pending data Z len: 5 po: 13
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: kind from backend: Z
2005-09-28 08:27:34 DEBUG: pid 8815: read_message_length: lenghth: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: message length: 5
2005-09-28 08:27:34 DEBUG: pid 8815: ReadyForQuery: transaction state: T
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend B(42)
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend D(44)
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend E(45)
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from frontend S(53)
2005-09-28 08:27:34 DEBUG: pid 8815: read kind from backend 2
2005-09-28 08:27:34 DEBUG: pid 8815: pool_process_query: waiting for secondary for data ready
2005-09-28 08:27:39 ERROR: pid 8815: pool_check_fd: data is not ready tp->tv_sec 5 tp->tp_usec 5000000
2005-09-28 08:27:39 ERROR: pid 8815: pool_process_query: secondary data is not ready at synchronous point. abort this session
2005-09-28 08:27:39 ERROR: pid 8815: pool_process_query: kind does not match between backends master(2) secondary()
2005-09-28 08:27:39 LOG:   pid 8815: do_child: exits with status 1 due to error
2005-09-28 08:27:39 DEBUG: pid 8783: reap_handler called
2005-09-28 08:27:39 DEBUG: pid 8783: child 8815 exits with status 256 by signal 0
2005-09-28 08:27:39 DEBUG: pid 8817: I am 8817
2005-09-28 08:27:39 DEBUG: pid 8783: fork a new child pid 8817
2005-09-28 08:27:43 LOG:   pid 8783: received fast shutdown request
2005-09-28 08:27:43 DEBUG: pid 8784: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8788: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8785: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8794: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8787: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8796: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8789: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8797: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8790: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8800: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8801: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8793: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8803: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8795: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8798: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8807: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8799: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8808: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8802: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8810: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8804: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8811: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8806: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8813: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8814: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8786: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8817: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8783: reap_handler called
2005-09-28 08:27:43 DEBUG: pid 8783: reap_handler called
2005-09-28 08:27:43 DEBUG: pid 8791: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8783: reap_handler called
2005-09-28 08:27:43 DEBUG: pid 8792: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8805: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8809: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8812: child receives shutdown request signal 2
2005-09-28 08:27:43 DEBUG: pid 8783: reap_handler called
2005-09-28 08:27:43 DEBUG: pid 8783: reap_handler called
test-adxi:~#                 

Aaron Thul
http://www.mtu.net/~aaron


t-ishii at sra.co.jp wrote:
>I'm not familiar with perl, so need detailed info.
>
>1) debug out of pgpool (start pgpool with -d option)
>2) PostgreSQL version?
>--
>SRA OSS, Inc. Japan
>Tatsuo Ishii
>
>> This program demonstrates one of the problems we had with pgpool.  It runs the same query twice, once with autobinding and one with explicit binds.
>> 
>> use DBI qw(:sql_types);
>> use ACI::DB;
>> my $dbh = ACI::DB::initDB();
>> 
>> my ($id, $oemid, $oemstr, $rid,  $file_num) = ("TEST124", "TESTOEM124",
>> "gcx", 456361, undef);
>> 
>> my $sql = qq{INSERT INTO trans_pending (transid, oemid, oemstring, rid,
>> filenum) VALUES(?, ?, ?, ?, ?)};
>> 
>> $dbh->do($sql, undef, $id, $oemid, $oemstr, $rid,  $file_num);
>> die $dbh->errstr()  if $dbh->errstr();
>> print "Got one success!\n";
>> $dbh->rollback();
>> die $dbh->errstr()  if $dbh->errstr();
>> print "Starting over!\n";
>> 
>> my $sth = $dbh->prepare($sql) || dbi_err;
>> $sth->bind_param(1, $id,     SQL_VARCHAR);
>> $sth->bind_param(2, $oemid,  SQL_VARCHAR);
>> $sth->bind_param(3, $oemstr, SQL_VARCHAR);
>> $sth->bind_param(4, $rid,    SQL_INTEGER);
>> $sth->bind_param(5, $file_num,SQL_INTEGER);
>> $sth->execute() || die $dbh->errstr();
>> $dbh->rollback();
>> print "Got two successes!\n";
>> 
>> 
>> 
>> The output we get is
>> 
>> Got one success!
>> Starting over!
>> DBD::Pg::st execute failed: server closed the connection unexpectedly
>>         This probably means the server terminated abnormally
>>         before or while processing the request.
>> server closed the connection unexpectedly
>>         This probably means the server terminated abnormally
>>         before or while processing the request.
>> 
>> 
>> (There is a 5 second pause between "Starting over" and the error message.)
>> 
>> Aaron Thul
>> http://www.mtu.net/~aaron
>> 
>> 
>> _______________________________________________________
>> Sent through e-mol. E-mail, Anywhere, Anytime. http://www.e-mol.com
>> 
>> 
>> 
>> _______________________________________________
>> Pgpool-general mailing list
>> Pgpool-general at pgfoundry.org
>> http://pgfoundry.org/mailman/listinfo/pgpool-general


Aaron Thul
http://www.mtu.net/~aaron

_______________________________________________________
Sent through e-mol. E-mail, Anywhere, Anytime. http://www.e-mol.com





More information about the Pgpool-general mailing list