From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Jim Nasby <jim(at)nasby(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_restore --no-post-data and --post-data-only |
Date: | 2011-08-31 21:27:50 |
Message-ID: | 4E5EA756.1090703@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 08/31/2011 04:03 PM, Alvaro Herrera wrote:
>>>
>>> Well, the Unix approach is to use tools that do one thing well to build up more complex tools. Making pg_dump run some external command to inject things into the stream seems like the wrong thing given this philosophy. Use pg_dump to get the bits you want (pre-data, post-data) and sandwich them around whatever else you want.
>> I agree... except for one little niggling concern: If pg_dump is injecting something, then the DDL is being grabbed with a single, consistent snapshot. --pre and --post do not get you that (though we could probably use the new ability to export snapshots to fix that...)
> Eh, --pre and --post are pg_restore flags, so you already have a
> consistent snapshot.
>
We've been talking about adding them for pg_dump too.
I take Jim's point about the snapshot, but I still don't feel it's a
good reason to allow some arbitrary code or script to be run between
them (and after all, it's not likely to run with the same snapshot anyway).
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Cédric Villemain | 2011-08-31 22:17:18 | Re: postgresql.conf archive_command example |
Previous Message | Tom Lane | 2011-08-31 20:59:19 | Re: Bogus nestloop join estimate, ignores WHERE clause |