From: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Proposal: More flexible backup/restore via pg_dump |
Date: | 2000-06-22 16:53:34 |
Message-ID: | 3.0.5.32.20000623025334.0096e6f0@mail.rhyme.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I am considering making some changes to pg_dump, and would appreciate any
suggestions/ideas from the list.
The outline is as follows:
- Add a flag to modify the output of pg_dump so that it is more amenable to
retrieving parts of the extracted data. This may involve writing the data
to a tar file/dbm file/custom-format file, rather than just a simple SQL
script file (see below).
- Add flags to allow selective import of information stored in the custom
dump file: eg. load the schema (no data), load only one table, define all
indexes or triggers for a given table etc. This would eventually allow for
overriding of tablespace settings.
- Add options to dump selected information in a readble format (ie.
probably SQL).
The broad approach would be modify the existing pg_dump as little as
possible; I am inclined to write the data as SQL (as currently done), and
append an 'index' to the output, specifying the offset on the file that
each piece of extractable data can be found. The 'restore' option would
just go to the relevant section(s), and pipe the data to psql.
I am also considering the possibility of writing the data to separate files
in a tar archive, since this may be a lot cleaner in the long run, although
the text file with the index at the end has the advantage that the index
could be written as a series of SQL comments, effectively making the dump
file compatible with existing dump file formats.
Any comments/suggestions would be appreciated.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.C.N. 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 |/
From | Date | Subject | |
---|---|---|---|
Next Message | Mikheev, Vadim | 2000-06-22 18:09:47 | RE: Big 7.1 open items |
Previous Message | Tom Lane | 2000-06-22 15:27:30 | Re: Big 7.1 open items |