Jean-Michel Chabanne <jeanmichel.chabanne@free.fr> writes:
> Today I got this message :
> server sent data ("D" message) without prior row description ("T" message)
> The query was a single select on a single table (a little more than 1.5
> millions rows) :
Your client program ran out of memory to hold the select result.
libpq unfortunately is not very good about dealing with that; it loses
track of what the backend is doing, leading to lots of messages like the
above until the server finally stops sending data. Fixing this is on
the to-do list, but hasn't been very high priority, since it would only
allow a more graceful failure :-(
If you really want to read all of a big table, consider using a cursor
so you can fetch a few rows at a time.
regards, tom lane