Thread: Error message : Server sent data ("D" message) ....
Hi, 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) : select * from nom_table; The message appeared a lot of times, and the query returned nothing. I had to kill the postgres subprocess which appeared in IDLE state. I run PostgreSQL 7.2.1 under AIX 4.3.3. From others psql clients, it was possible to run queries on this table. What do these messages mean ? -- Jean-Michel Chabanne 77450 MONTRY (FRANCE) 48" 54' N - 2" 49' E Powered by Linux
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
On Wed, Jun 26, 2002 at 10:16:24PM +0200, Jean-Michel Chabanne wrote: > > Hi, > > 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) : > > select * from nom_table; I think the client got confused. What is happening is that the server is sending the entire table to the client side and the client is storing the whole thing in memory. Can you even store that? > The message appeared a lot of times, and the query returned nothing. I had > to kill the postgres subprocess which appeared in IDLE state. > > I run PostgreSQL 7.2.1 under AIX 4.3.3. > > >From others psql clients, it was possible to run queries on this table. > > What do these messages mean ? It's a client error. Don't do select * on a big table, only bad things happen. Maybe you want cursors? -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > There are 10 kinds of people in the world, those that can do binary > arithmetic and those that can't.