Re: Problem w/ dumping huge table and no disk space - Mailing list pgsql-general

From David Ford
Subject Re: Problem w/ dumping huge table and no disk space
Date
Msg-id 3B99B3DA.5090104@blue-labs.org
Whole thread Raw
In response to Problem w/ dumping huge table and no disk space  (David Ford <david@blue-labs.org>)
Responses Re: Problem w/ dumping huge table and no disk space
List pgsql-general
>
>
>Do you have ssh available on your computer?  Is an sshd daemon running
>on the other computer?
>
>Then try this:
>
>pg_dump mydatabase|ssh othersystem.com dd of=/home/me/database.dump
>
>The output of pg_dump on your computer will end up on the other
>computer in /home/me/database.dump.
>

The problem with that was all in that 7.1b had some broken stuff.  psql
and pg_dump ate huge amounts of memory while storing the data which were
eventually killed by the OOM handler.  They never got to the point of
dumping the data.  The solution was to start pg_dump from the new box
and connect to the old server, pg_dump was fixed in that one.  That
worked just fine.

Thank you for the suggestion.

On a side note (Tom, Bruce, etc), is there some way to mitigate psql's
storage of all rows returned in memory?  Perhaps a 'swap' file?  If you
connect to a 1.7G database and issue a query on it that returns a lot of
rows, the entire thing is held in memory which with such a query is
likely to cause an OOM and get killed.

David



pgsql-general by date:

Previous
From: caldodge@fpcc.net (Calvin Dodge)
Date:
Subject: Re: Problem w/ dumping huge table and no disk space
Next
From: Justin Clift
Date:
Subject: Re: Idea: jobs.postgresql.org