Skip site navigation (1) Skip section navigation (2)

Re: pg_dump additional options for performance

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, daveg <daveg(at)sonic(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: pg_dump additional options for performance
Date: 2008-07-22 06:35:30
Message-ID: 1216708530.3894.103.camel@ebony.2ndQuadrant (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Mon, 2008-07-21 at 19:19 -0400, Tom Lane wrote:
> Stephen Frost <sfrost(at)snowman(dot)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


In response to

pgsql-hackers by date

Next:From: Markus WannerDate: 2008-07-22 08:04:20
Subject: Postgres-R: tuple serialization
Previous:From: Martijn van OosterhoutDate: 2008-07-22 06:33:21
Subject: Re: [WIP] collation support revisited (phase 1)

pgsql-patches by date

Next:From: Simon RiggsDate: 2008-07-22 12:44:33
Subject: Re: [HACKERS] Hint Bits and Write I/O
Previous:From: davegDate: 2008-07-22 05:57:35
Subject: Re: pg_dump lock timeout

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group