From: Simon Riggs <simon@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: daveg <daveg@sonic.net>
Cc: pgsql-patches@postgresql.org
Subject: Re: pg_dump additional options for performance
Date: Tue, 22 Jul 2008 07:35:30 +0100
Message-ID: <1216708530.3894.103.camel@ebony.2ndQuadrant> (raw)
In-Reply-To: <19095.1216682386@sss.pgh.pa.us>
References: <1216529229.19656.835.camel@ebony.2ndQuadrant>
<1216535862.19656.845.camel@ebony.2ndQuadrant>
<20080720214335.GB18846@tamriel.snowman.net>
<1216591180.19656.848.camel@ebony.2ndQuadrant>
<20080721011829.GC18846@tamriel.snowman.net>
<20080721014942.GC30869@sonic.net>
<20080721015850.GD18846@tamriel.snowman.net>
<18415.1216611275@sss.pgh.pa.us>
<20080721115416.GF18846@tamriel.snowman.net>
<17578.1216672737@sss.pgh.pa.us>
<20080721210057.GH18846@tamriel.snowman.net>
<19095.1216682386@sss.pgh.pa.us>
On Mon, 2008-07-21 at 19:19 -0400, Tom Lane wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > Are there use cases for just --omit-post-load or --omit-pre-load?
>
> Probably not many. The thing that's bothering me is the
> action-at-a-distance property of the positive-logic switches.
> How are we going to explain this?
>
> "By default, --schema-pre-load, --data-only, --schema-post-load
> are all ON. But if you turn one of them ON (never mind that
> it was already ON by default), that changes the defaults for
> the other two to OFF. Then you have to turn them ON (never
> mind that the default for them is ON) if you want two out of
> the three categories."
While I accept your argument a certain amount, --schema-only and
--data-only already behave in the manner you describe. Whether we pick
include or exclude or both, it will make more sense than these existing
options, regrettably.
With regard to the logic, Insert and COPY also behave this way: if you
mention *any* columns then you only get the ones you mention. We manage
to describe that also. An Insert statement would be very confusing if
you had to list the columns you don't want.
So the --omit options seem OK if you assume we'll never add further
options or include additional SQL in the dump. But that seems an
unreliable prop, so I am inclined towards the inclusive approach.
> You have to bend your mind into a pretzel to wrap it around this
> behavior.
Perhaps my mind was already toroidally challenged? :-}
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-patches@postgresql.org
Cc: simon@2ndquadrant.com, tgl@sss.pgh.pa.us, sfrost@snowman.net, daveg@sonic.net
Subject: Re: pg_dump additional options for performance
In-Reply-To: <1216708530.3894.103.camel@ebony.2ndQuadrant>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox