URGENT: pg_dump error

Started by jeromeabout 23 years ago2 messagesgeneral
Jump to latest
#1jerome
jerome@gmanmi.tv

i tried to do pg_dump

pg_dump mydatabase -t mytable > sample

it always results to

KILLED

can anyone tell me what should i do...

TIA

#2Dmitry Tkach
dmitry@openratings.com
In reply to: jerome (#1)
Re: URGENT: pg_dump error

I suspect, your problem is that the output file is too large (if you are on ext2, you cannot have files larger than 2 gig in the filesystem).
Try this:
pg_dump mydatabase -t mytable | gzip -f > sample.gz
or
pg_dump mydatabase -t mytable | split -C 2000m - sample.
or even
pg_dump mydatabase -t mytable | gzip -f | split -b 2000m - sample.gz.
...

The first case should work, unless even the compressed file is larger than 2 gig, either of the other two will work regardless of the output size
(as long as it fits on your disk of course).
In the two last cases, it will create several files, called like sample.aa, sample,ab... or sample.gz.aa, sample.gz.bb etc...
To 'reassemble' them later, you'll need something like:

cat sample.* | psql mydatabase #for the first case - no gzip or
cat sample.gz.* | gunzip -f | psql mydatabase

I hope, it helps...

Dima

jerome wrote:

Show quoted text

i tried to do pg_dump

pg_dump mydatabase -t mytable > sample

it always results to=20

KILLED

can anyone tell me what should i do...

TIA

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org