pg_restore --no-post-data and --post-data-only - Mailing list pgsql-hackers

From Andrew Dunstan
Subject pg_restore --no-post-data and --post-data-only
Date
Msg-id 4E540DFA.6020205@dunslane.net
Whole thread Raw
Responses Re: pg_restore --no-post-data and --post-data-only
List pgsql-hackers
Attached is an undocumented patch that allows pg_restore to omit
post-data items or omit all but post-data items. This has been discussed
before, and Simon sent in a patch back on 2008, which has bitrotted
some. I'm not sure why it was dropped at the time, but I think it's time
to do this. This patch relies on some infrastructure that was added
since Simon's patch, so it works a bit differently  (and more simply).

So with this patch, the following three sequences should be equivalent:

     pg_restore --no-post-data
     pg_restore --post-data-only

     pg_restore -s --no-post-data
     pg_restore -a
     pg_restore --post-data-only

     pg_restore


This is useful and worth doing on its own, and will also add to the
usefulness of the pg_dump --exclude-table-data patch in my previous email.

As with that patch, a version that applies to version 9.0 and 8.4
sources is also attached, for the very eager.

cheers

andrew



Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: skip WAL on COPY patch
Next
From: Steve Singer
Date:
Subject: Re: skip WAL on COPY patch