From: Stephen Frost <sfrost@snowman.net>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-patches@postgresql.org
Subject: Re: pg_dump additional options for performance
Date: Sat, 26 Jul 2008 11:11:10 -0400
Message-ID: <20080726151110.GF16005@tamriel.snowman.net> (raw)
In-Reply-To: <1217063104.3894.1100.camel@ebony.2ndQuadrant>
References: <1216621040.19656.867.camel@ebony.2ndQuadrant>
<20080721115602.GG18846@tamriel.snowman.net>
<1216831237.3894.676.camel@ebony.2ndQuadrant>
<1216832987.3894.678.camel@ebony.2ndQuadrant>
<20080724032047.GI18846@tamriel.snowman.net>
<1216885031.3894.739.camel@ebony.2ndQuadrant>
<21687.1216886041@sss.pgh.pa.us>
<1216889809.3894.747.camel@ebony.2ndQuadrant>
<2818.1217027784@sss.pgh.pa.us>
<1217063104.3894.1100.camel@ebony.2ndQuadrant>
* Simon Riggs (simon@2ndquadrant.com) wrote:
> The key capability here is being able to split the dump into multiple
> pieces. The equivalent capability on restore is *not* required, because
> once the dump has been split the restore never needs to be. It might
> seem that the patch should be symmetrical with respect to pg_dump and
> pg_restore, but I see no use case for the pg_restore case.
I'm inclined to agree with this. It might have been nice to provide a
way to split out already-created dumps, but I suspect that people who
need that probably have already figured out a way to do it (I know I
have..). We should probably ensure that pg_restore doesn't *break* when
fed a partial dump.
> > The patch as submitted enforces what seem largely arbitrary restrictions
> > on combining these switches.
>
> I had it both ways at various points in development. I'm happy with what
> you propose.
I agree with removing the restrictions. I don't see much in the way of
use cases, but it reduces code and doesn't cause problems.
> > Another issue is that the rules for deciding which objects are "before
> > data" and which are "after data" are wrong. In particular ACLs are after
> > data not before data, which is relatively easy to fix.
>
> OK
This was partially why I was complaining about having documentation, and
a policy for that matter, which goes into more detail about why X is before
or after the data. I agree that they're after today, but I don't see
any particular reason why they should be one or the other. If we
adopted a policy like I proposed (--schema-post-data is essentially that
which uses the data and is faster done in bulk) then ACLs would be
before, and I tend to feel like it makes more sense that way.
> > Not so easy to fix
> > is that COMMENTs might be either before or after data depending on what
> > kind of object they are attached to.
>
> Is there anything to fix? Comments are added by calls to dumpComment,
> which are always made in conjunction with the dump of an object. So if
> you dump the object you dump the comment. As long as objects are
> correctly split out then comments will be also.
I agree with this, and it follows for BLOB comments- in any case, they
go with the object being dumped at the time of that object getting
dumped. Comments make sense as an extention of the object, not as a
seperate set of objects to be explicitly placed before or after the
data.
> All of the above makes me certain I want to remove these options from
> pg_restore.
I'm in agreement with this.
> > BTW, another incomplete item is that pg_dumpall should probably be taught
> > to accept and pass down --schema-before-data and --schema-after-data
> > switches.
>
> OK
I could go either way on this.
> Can we prune down to the base use case to avoid this overhead? i.e. have
> these options on pg_dump only?
Makes sense to me.
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 196B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-patches@postgresql.org
Cc: sfrost@snowman.net, simon@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re: pg_dump additional options for performance
In-Reply-To: <20080726151110.GF16005@tamriel.snowman.net>
References: <1216621040.19656.867.camel@ebony.2ndQuadrant> <20080721115602.GG18846@tamriel.snowman.net> <1216831237.3894.676.camel@ebony.2ndQuadrant> <1216832987.3894.678.camel@ebony.2ndQuadrant> <20080724032047.GI18846@tamriel.snowman.net> <1216885031.3894.739.camel@ebony.2ndQuadrant> <21687.1216886041@sss.pgh.pa.us> <1216889809.3894.747.camel@ebony.2ndQuadrant> <2818.1217027784@sss.pgh.pa.us> <1217063104.3894.1100.camel@ebony.2ndQuadrant> <20080726151110.GF16005@tamriel.snowman.net>
* 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