Re: Query bombed: why? - Mailing list pgsql-general

From Tom Lane
Subject Re: Query bombed: why?
Date
Msg-id 13757.957893701@sss.pgh.pa.us
Whole thread Raw
In response to Query bombed: why?  (Jeff Eckermann <jeckermann@verio.net>)
List pgsql-general
Jeff Eckermann <jeckermann@verio.net> writes:
> After about 25 minutes of running a query with a "where not exists
> 'correlated subquery'", I got a whole bunch of lines printing out: "Backend
> sent D message without prior T".
> Could someone give me an idea of what that means, and how to deal with it?

How many rows were you expecting the query to produce?  (It might be
worth redoing it as a SELECT count(*) FROM ... to find out how many it
really produced.)  My first bet is that your frontend application ran
out of memory while trying to absorb the query result.  libpq is
designed to collect the whole result before handing it back to the
application, which is nice for some things but starts to look like a bad
idea when you have a huge query result.  Also, libpq doesn't react very
gracefully to running out of memory :-( --- the symptoms you describe
sound like one likely failure mode.  (We need to fix that...)

You might be able to increase your process memory limit; otherwise,
consider using DECLARE CURSOR and FETCH to retrieve the query result
a few hundred rows at a time.

            regards, tom lane

pgsql-general by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: Just test... sorry
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: Steering committee responce to Great Bridge LLC