Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8A26A65021F for ; Fri, 25 Jul 2008 23:39:41 -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 32493-02 for ; Fri, 25 Jul 2008 23:39:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tinlc.com (unknown [72.18.206.65]) by postgresql.org (Postfix) with ESMTP id 7E48B6501D0 for ; Fri, 25 Jul 2008 23:39:36 -0300 (ADT) Received: from biglumber.com ([72.18.206.64] helo=localhost) by tinlc.com with smtp (Exim 4.60) (envelope-from ) id 1KMZh0-0002zG-EX; Fri, 25 Jul 2008 21:39:34 -0500 From: "Greg Sabino Mullane" To: pgsql-patches@postgresql.org Subject: Re: pg_dump additional options for performance X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <2818.1217027784@sss.pgh.pa.us> Date: Sat, 26 Jul 2008 02:39:34 -0000 X-Mailer: JoyMail 2.01 Message-ID: <848d3723f7f4e3c0b0b1c597c5dc6ca8@biglumber.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.1 tagged_above=0 required=5 tests=RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200807/252 X-Sequence-Number: 6946 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Tom Lane wrote: > * --schema-before-data, --data-only, and --schema-after-data can be I thought you were arguing for some better names at one point? Those seem very confusing to me, especially "--schema-after-data". I know it means "the parts of the schema that come after the data" but it could also be read as other ways, including "put the schema after the data" - which makes no sense, but the name is not exactly intuitive either. "Pre" and "Post" at least are slightly better, IMO. How about --pre-data-schema and --post-data-schema? Or --pre-data-section and --post-data-section? Or (my favorites) --pre-data-commands and --post-data-commands? As the existing docs say, "commands" are what we are generating. > them as data, because the objects they are attached to are data. I kind > of like the latter approach because it would create an invariant that > comments appear in the same dump section as the object commented on. > Thoughts?) +1 on putting them next to the object commented on. > And there's yet another issue here, which is that it's not entirely clear > that the type of an object uniquely determines whether it's before or > after data. Wouldn't that be a problem with current dumps as well then? > We could solve that problem by inserting a "dummy data" TOC entry where > the data would have appeared, but this will only work in new archive > files. With an implementation like this, pg_restore with > --schema-before-data or --schema-after-data won't behave very nicely on a > pre-8.4 --schema-only archive file. (Presumably it would act as though > all the objects were "before" data.) Is that a small enough corner case > to live with in order to gain implementation simplicity and robustness? I'm not comfortable with corner cases for pg_restore backwards compatibility. What exactly would happen (worse case) in that scenario? - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200807252235 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAkiKjgMACgkQvJuQZxSWSsiRMACg7c/VDo9hTTjukkFFvLYI31mL BqkAn3FfepllvVnIwX+efA5cLPlVbDd0 =V/Sv -----END PGP SIGNATURE-----