Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7D89364FCB8 for ; Tue, 22 Jul 2008 03:29:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 05494-10 for ; Tue, 22 Jul 2008 03:29:15 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mk-outboundfilter-3.mail.uk.tiscali.com (mk-outboundfilter-3.mail.uk.tiscali.com [212.74.114.23]) by postgresql.org (Postfix) with ESMTP id 97FC464FCB9 for ; Tue, 22 Jul 2008 03:29:16 -0300 (ADT) X-Trace: 147847635/mk-outboundfilter-1.mail.uk.tiscali.com/F2S/$F2S-NILDRAM-ACCEPTED/f2s-temporary-group/85.211.229.155 X-SBRS: None X-RemoteIP: 85.211.229.155 X-IP-MAIL-FROM: simon@2ndquadrant.com X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiEBAAwbhUhV0+Wb/2dsb2JhbAAIryo X-IronPort-AV: E=Sophos;i="4.31,229,1215385200"; d="scan'208";a="147847635" X-IP-Direction: IN Received: from 85-211-229-155.dyn.gotadsl.co.uk (HELO [192.168.0.3]) ([85.211.229.155]) by smtp.f2s.tiscali.co.uk with ESMTP; 22 Jul 2008 07:29:14 +0100 Subject: Re: pg_dump additional options for performance From: Simon Riggs To: Tom Lane Cc: Stephen Frost , daveg , pgsql-patches@postgresql.org 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> Content-Type: text/plain Date: Tue, 22 Jul 2008 07:35:30 +0100 Message-Id: <1216708530.3894.103.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/221 X-Sequence-Number: 6915 On Mon, 2008-07-21 at 19:19 -0400, Tom Lane wrote: > Stephen Frost 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