On Sep 3, 2011, at 7:27 PM, Mr. Puneet Kishor wrote:
> I am on Mac OS X Lion with Pg 9.0.x, Perl 5.14.1, and the latest iterations
> of DBI and DBD::Pg. My code is pretty straightforward
>
> my $dbh = DBI->connect("dbi:Pg:dbname=macromap;host=localhost;port=5432",
> 'postgres', 'postgres');
> my $sth = $dbh->prepare( .. );
> $sth->execute;
> while (my (retrieved columns) = $sth->fetchrow_array) {
> do something with retrieved columns
> }
>
> The code bombs with the message:
>
> DBD::Pg::st execute failed: server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request. at ...
IIRC, I've seen that when the back end had segfaulted. What do you see in your
PostgreSQL log?
Best,
David