Tom Lane wrote:
> COPY uses a streaming style of output.  To generate INSERT commands,
> pg_dump first does a "SELECT * FROM table", and that runs into libpq's
> suck-the-whole-result-set-into-memory behavior.  See nearby thread
> titled "Large Tables(>1 Gb)".

Hmm, any reason why pg_dump couldn't do a 

SELECT * from table where 1 = 0

to get the column names and then do a COPY and reformat
the output...

> > Yes, we are using -D, mainly because we've had "issues" with
> > the COPY based export, ie, it won't read the resulting file
> > back. Admittedly this was a while ago now and I havn't checked
> > since.
> 
> IIRC that's a long-since-fixed bug.  If not, file a bug report so
> we can fix whatever's still wrong...

It may be fixed, but we're still running an old version of
postgres, so it may not be fixed in the version we're using...

> Philip Warner needs alpha testers for his new version of pg_dump ;-).
> Unfortunately I think he's only been talking about it on pghackers
> so far.

What versions does it work on?

-- 
Martijn van Oosterhout <[EMAIL PROTECTED]>
http://cupid.suninternet.com/~kleptog/

Reply via email to