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.
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 |/
pgsql-hackers by date
|Next:||From: Mikheev, Vadim||Date: 2000-06-22 18:09:47|
|Subject: RE: Big 7.1 open items |
|Previous:||From: Tom Lane||Date: 2000-06-22 15:27:30|
|Subject: Re: Big 7.1 open items |