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

Aaron aaron at mtu.net
Mon Sep 26 19:28:47 GMT 2005


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





More information about the Pgpool-general mailing list