psql crashing - don't know why - Mailing list pgsql-general

From Brent Wood
Subject psql crashing - don't know why
Date
Msg-id 4A7FFEB90200007B0001D600@gwia1.ham.niwa.co.nz
Whole thread Raw
Responses Re: psql crashing - don't know why  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: psql crashing - don't know why  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Hi...

I have a view across 3 tables, total some 5m rows.

I can extract parts of the view, entire rows, with a where clause
(eg: select * from view where cell_id=100000;)

If I try to select the entire view (eg: select * from view;) it runs for a while then gives the error msg "Killed" and
returnsto the system prompt, having exited psql. 

The log says:
2009-08-10 00:19:01 NZST ben200601 woodb LOG:  could not send data to client: Broken pipe
2009-08-10 00:19:48 NZST ben200601 woodb LOG:  unexpected EOF on client connection


I have written a script along the lines of:

get distinct cell_id from table; > file

while read cell ; do
   psql -d db -c "select * from view where cell=$cell;" >> output
done < file

This worked, & the number of lines in the output file is the same number as that returned by "select count(*) from
view;"(which works fine), but I'd like to find out the cause of the error. I assume there is some sort of timeout or
overflowoccurring, but I can't see any indication of what settings I can change to fix this. All the underlying tables
havejust had vacuum analyse run on them. 

I'm running PostgreSQL 8.1.4 on x86_64 Linux, I know it is dated, but I'm not in a position to upgrade at this point.


Thanks,

  Brent Wood



Brent Wood
DBA/GIS consultant
NIWA, Wellington
New Zealand
NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.

pgsql-general by date:

Previous
From: Kobus Wolvaardt
Date:
Subject: Re: Postgres memory question
Next
From: Scott Marlowe
Date:
Subject: Re: psql crashing - don't know why