Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Martijn van Oosterhout
On Thu, Oct 05, 2006 at 11:56:43AM -0400, Mark Woodward wrote: The query was executed as: psql -p 5435 -U pgsql -t -A -c select client, item, rating, day from ratings order by client netflix netflix.txt My question, it looks like the kernel killed psql, and not postmaster. The postgresql

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread AgentM
On Oct 5, 2006, at 11:56 , Mark Woodward wrote: I am using the netflix database: Table public.ratings Column | Type | Modifiers +--+--- item | integer | client | integer | day| smallint | rating | smallint | The query was executed as: psql -p 5435

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Tom Lane
Mark Woodward [EMAIL PROTECTED] writes: psql -p 5435 -U pgsql -t -A -c select client, item, rating, day from ratings order by client netflix netflix.txt My question, it looks like the kernel killed psql, and not postmaster. Not too surprising. Question, is this a bug in psql? It's really

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Mark Woodward
Mark Woodward [EMAIL PROTECTED] writes: psql -p 5435 -U pgsql -t -A -c select client, item, rating, day from ratings order by client netflix netflix.txt My question, it looks like the kernel killed psql, and not postmaster. Not too surprising. Question, is this a bug in psql? It's

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Mark Woodward
On Thu, Oct 05, 2006 at 11:56:43AM -0400, Mark Woodward wrote: The query was executed as: psql -p 5435 -U pgsql -t -A -c select client, item, rating, day from ratings order by client netflix netflix.txt My question, it looks like the kernel killed psql, and not postmaster. The postgresql

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Chris Mair
FWIW, there's a feature in CVS HEAD to instruct psql to try to use a cursor to break up huge query results like this. For the moment I'd suggest using COPY instead. That's sort of what I was afraid off. I am trying to get 100 million records into a text file in a specific order.

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Andrew Dunstan
Tom Lane wrote: Mark Woodward [EMAIL PROTECTED] writes: psql -p 5435 -U pgsql -t -A -c select client, item, rating, day from ratings order by client netflix netflix.txt FWIW, there's a feature in CVS HEAD to instruct psql to try to use a cursor to break up huge query results like

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Mark Woodward
FWIW, there's a feature in CVS HEAD to instruct psql to try to use a cursor to break up huge query results like this. For the moment I'd suggest using COPY instead. That's sort of what I was afraid off. I am trying to get 100 million records into a text file in a specific order.

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Luke Lonergan
@postgresql.org Subject:Re: [HACKERS] Query Failed, out of memory Tom Lane wrote: Mark Woodward [EMAIL PROTECTED] writes: psql -p 5435 -U pgsql -t -A -c select client, item, rating, day from ratings order by client netflix netflix.txt FWIW, there's a feature in CVS HEAD to instruct

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Mark Woodward
Tom Lane wrote: Mark Woodward [EMAIL PROTECTED] writes: psql -p 5435 -U pgsql -t -A -c select client, item, rating, day from ratings order by client netflix netflix.txt FWIW, there's a feature in CVS HEAD to instruct psql to try to use a cursor to break up huge query results like this.

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Benny Amorsen
MW == Mark Woodward [EMAIL PROTECTED] writes: MW Yea, I've been toying with the idea of that setting lately, I MW can't for the life of me understand why it isn't the default MW behavior. Lots of programs handle malloc() failures very badly. Including daemons. Often it's better in practice to

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Neil Conway
On Thu, 2006-10-05 at 12:52 -0400, Luke Lonergan wrote: Create table as select ... Order by ... Copy to ... Or in 8.2, COPY TO (SELECT ... ORDER BY) (My, that's a neat feature.) -Neil ---(end of broadcast)--- TIP 5: don't forget to increase

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Luke Lonergan
@postgresql.org Subject:Re: [HACKERS] Query Failed, out of memory On Thu, 2006-10-05 at 12:52 -0400, Luke Lonergan wrote: Create table as select ... Order by ... Copy to ... Or in 8.2, COPY TO (SELECT ... ORDER BY) (My, that's a neat feature.) -Neil

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Neil Conway
On Thu, 2006-10-05 at 14:53 -0400, Luke Lonergan wrote: Is that in the release notes? Yes: Allow COPY to dump a SELECT query (Zoltan Boszormenyi, Karel Zak) -Neil ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Mark Woodward
On Thu, 2006-10-05 at 14:53 -0400, Luke Lonergan wrote: Is that in the release notes? Yes: Allow COPY to dump a SELECT query (Zoltan Boszormenyi, Karel Zak) I remember this discussion, it is cool when great features get added. ---(end of

Re: [HACKERS] Query Failed, out of memory

2006-10-05 Thread Jim Nasby
On Oct 5, 2006, at 11:15 AM, Mark Woodward wrote: On Thu, Oct 05, 2006 at 11:56:43AM -0400, Mark Woodward wrote: The query was executed as: psql -p 5435 -U pgsql -t -A -c select client, item, rating, day from ratings order by client netflix netflix.txt My question, it looks like the