Re: BUG #2481: select from table's join with geometries doesn't go - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2481: select from table's join with geometries doesn't go
Date
Msg-id 16566.1150467484@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #2481: select from table's join with geometries doesn't go  (Michael Fuhr <mike@fuhr.org>)
Responses Re: BUG #2481: select from table's join with geometries doesn't go
List pgsql-bugs
Michael Fuhr <mike@fuhr.org> writes:
> That's a lot of data -- are you aware that psql (via libpq) fetches
> the entire result set before displaying it?  In most cases 18444
> rows wouldn't be a problem, but with rows that wide it becomes a
> big problem because the client has to store it all in memory.  I
> wonder if that's causing psql to segfault, although I'd expect a
> graceful error like "out of memory for query result" unless maybe
> psql consumes so much memory that the OS has problems.

I'm wondering the same --- psql is definitely designed to survive
out-of-memory:

regression=# select * from tenk1 a, tenk1 b limit 2000000;
-- time passes ...
out of memory for query result
regression=#

Emilia might have found some corner case where it doesn't, though;
perhaps a malloc call that's not error-checked.  A stack trace from
the psql core dump would be useful.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: BUG #2481: select from table's join with geometries doesn't go
Next
From: Tom Lane
Date:
Subject: Re: BUG #2481: select from table's join with geometries doesn't go