From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-patches@postgresql.org
Subject: Re: pg_dump additional options for performance
Date: Sun, 27 Jul 2008 20:52:24 -0400
Message-ID: <20080728005224.GJ16005@tamriel.snowman.net> (raw)
In-Reply-To: <24456.1217094974@sss.pgh.pa.us>
References: <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>
<23540.1217089204@sss.pgh.pa.us>
<1217091402.3894.1185.camel@ebony.2ndQuadrant>
<24456.1217094974@sss.pgh.pa.us>
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Right, but the parallelization is going to happen sometime, and it is
> going to happen in the context of pg_restore. So I think it's pretty
> silly to argue that no one will ever want this feature to work in
> pg_restore.
I think you've about convinced me on this, and it annoys me. ;) Worse
is that it sounds like this might cause the options to not make it in
for 8.4, which would be quite frustrating.
> To extend the example I just gave to Stephen, I think a fairly probable
> scenario is where you only need to tweak some "before" object
> definitions, and then you could do
>
> pg_restore --schema-before-data whole.dump >before.sql
> edit before.sql
> psql -f before.sql target_db
> pg_restore --data-only --schema-after-data -d target_db whole.dump
>
> which (given a parallelizing pg_restore) would do all the time-consuming
> steps in a fully parallelized fashion.
Alright, this has been mulling around in the back of my head a bit and
has now finally surfaced- I like having the whole dump contained in a
single file, but I hate having what ends up being "out-dated" or "wrong"
or "not what was loaded" in the dump file. Doesn't seem likely to be
possible, but it'd be neat to be able to modify objects in the dump
file.
Also, something which often happens to me is that I need to change the
search_path or the role at the top of a .sql from pg_dump before
restoring it. Seems like using the custom format would make that
difficult without some pipe/cat/sed magic. Parallelization would make
using that kind of magic more difficult too, I would guess. Might be
something to think about.
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, tgl@sss.pgh.pa.us, simon@2ndquadrant.com
Subject: Re: pg_dump additional options for performance
In-Reply-To: <20080728005224.GJ16005@tamriel.snowman.net>
References: <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> <23540.1217089204@sss.pgh.pa.us> <1217091402.3894.1185.camel@ebony.2ndQuadrant> <24456.1217094974@sss.pgh.pa.us> <20080728005224.GJ16005@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