Thread: pg_dump

pg_dump

From
Tatsuo Ishii
Date:
Does anybody know:

1) Is the tar/custom format of pg_dump is portable accross different  platforms?

2) if I want to dump out all of database cluster contents including  large objects, is following procedure correct?
  (dump procedure)  pg_dumpall -g  pg_dump -F c .... for each database   :   :
  (restore procedure)  initdb  psql template1 < dumpout_of_pg_dumpall  pg_restore ... for each database

--
Tatsuo Ishii


Re: pg_dump

From
Philip Warner
Date:
At 10:00 25/04/01 +0900, Tatsuo Ishii wrote:
>Does anybody know:
>
>1) Is the tar/custom format of pg_dump is portable accross different
>   platforms?

It's supposed to be; if it's not, it's a bug.


>2) if I want to dump out all of database cluster contents including
>   large objects, is following procedure correct?
>
>   (dump procedure)
>   pg_dumpall -g
>   pg_dump -F c .... for each database
>       :
>       :
>
>   (restore procedure)
>   initdb
>   psql template1 < dumpout_of_pg_dumpall
>   pg_restore ... for each database

Looks OK to me. You need a '-b' on the pg_dump (for BLOBS), and each dump
command will need to go to a separate file - it won't currently work if
multiple dumps are being sent to stdout.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


Re: pg_dump

From
Philip Warner
Date:
At 12:04 25/04/01 +1000, Philip Warner wrote:
>
>it won't currently work if
>multiple dumps are being sent to stdout.

This latter could be fixed (at least for 'c' format) by modifying pg_dump
to use open/read/write/lseek instead of fopen/fread/fwrite/fseek etc.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/