BUG #4698: psql.exe is exits reporting "out of memory" error

From: "Yuri Cherio" <yuri(at)aergo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4698: psql.exe is exits reporting "out of memory" error
Date: 2009-03-10 18:13:12
Message-ID: 200903101813.n2AIDCtq099974@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4698
Logged by: Yuri Cherio
Email address: yuri(at)aergo(dot)com
PostgreSQL version: 8.3.5-2
Operating system: Windows XP Pro, SP3
Description: psql.exe is exits reporting "out of memory" error
Details:

I have SELECT statement result of which I need to dump into a file. Before
dumping it I do line-by-line formatting. The command line looks like this:

psql -f "filename.sql" | sed '<formatting>' > "out_file_name"

Whenever the result set is large (hundreds of thousands of rows) the command
fails and the "out_file_name" size is zero. Simplified command (see below)
has absolutely same behavior:

psql -f "filename.sql" > "out_file_name"

One would expect that standard output should not be accumulated until it
blows up but instead would behave as a stream.

I didn't try this on linux, but it is happening in Windows.

P.S. The same can be achieved with COPY command, however conceptually
speaking the problem of not streaming the result properly still exists.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Scott Reed 2009-03-10 19:23:19 BUG #4699: pg_restore hangs with incorrect file format
Previous Message Teodor Sigaev 2009-03-10 17:44:57 Re: BUG #4697: to_tsvector hangs on input