On Tue, Oct 15, 2013 at 10:34:16PM +0200, Michelle Sullivan wrote: > exception for public.account2email:? Error was DBD::Pg::db pg_result > failed: No asynchronous query is running at > /usr/lib/perl5/site_perl/5.8.8/Bucardo.pm line 8589.
I can't seem to figure this one out. That error pops up if we call
pg_result but haven't just run an asynchronous query. However, inside
of delete_rows(), we call async at the end of each loop:
for my $loop (1..$count) {
my $async = $loop==$count ? PG_ASYNC : 0;
if (1 == $numpks) {
$t->{deletesth} = $tdbh->prepare("$pre$SQL{ANY}{$tname}", { pg_async =>
$async });
my $res = $t->{deletesth}->execute($SQL{ANYargs}->[$loop-1]);
$count{$t} += $res unless $async;
}
else {
$count{$t} += $tdbh->do($pre.$SQL{IN}->[$loop-1], { pg_direct => 1,
pg_async => $async });
$t->{deletesth} = 0;
}
}
Then the next block of code that runs using that database handle is:
## Final cleanup as needed (e.g. process async results)
...
## Wrap up all the async queries
($count{$t} += $tdbh->pg_result()) =~ s/0E0/0/o;
## Call finish if this was a statement handle (as opposed to a do)
if ($t->{deletesth}) {
$t->{deletesth}->finish();
}
delete $t->{deletesth};
Maybe my tired eyes overlooked something, but I can't see how we
reach that pg_cancel without setting pg_async to true. Any chance
you can send me the Postgres logs for just before that error to help
track things down?
--
Greg Sabino Mullane [email protected]
End Point Corporation
PGP Key: 0x14964AC8
signature.asc
Description: Digital signature
_______________________________________________ Bucardo-general mailing list [email protected] https://mail.endcrypt.com/mailman/listinfo/bucardo-general
