I am getting Errors from Postgres 7.1 while maintaing persistent connections from a 
script:

NOTICE: current transaction is aborted, queries ignored until end of transaction block


I am using DBI and DBD::Pg to connect...I didn't start getting this until I did the 
following to alleviate some memory leakage issues:

if ($requests>1000) {
  $db->disconnect();
  $db->connect();  #Assume appropriate connection string...
  $requests=0;
}

Now the memory problem has gone away..but at some point my handles ALL start getting 
the above and I don't understand HOW to end the transaction block...I am only running 
and retrieving queries...do I still need to do a commit at some point to close the 
transaction block?  my queries run like the following:

$sth=$db->prepare(qq($query));
$result=$sth->execute;
$rows=$sth->rows;
$err=$sth->err;
$errstr=$sth->errstr;
$sth->finish();


The real crux is this: ONLY The FIRST query with an ERROR returns an error...after 
that it ACTS like everything is normal, but isn't even getting acknowledgement from 
the $db...other than that $rows changes from "-1" to "-2";   (Which I assume is an 
Error of sorts but I'd rather see an error in $h->err or $h-errstr;)

I tried haveing RaiesError=>1 in my connect string and EVALing the statement...but the 
statement was never executing at all...I took the eval out, and it would DIE on an 
error..but it would execute.

Any Suggestions would be greatly appreciated...

Thanks,

Michael.

Reply via email to