From: | Joshua Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jim Nasby <jim(at)nasby(dot)net> |
Subject: | Re: pg_restore --no-post-data and --post-data-only |
Date: | 2011-11-16 01:19:14 |
Message-ID: | 582950054.139814.1321406354126.JavaMail.root@mail-1.01.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > Here is a patch for that for pg_dump. The sections provided for are
> > pre-data, data and post-data, as discussed elsewhere. I still feel that
> > anything finer grained should be handled via pg_restore's --use-list
> > functionality. I'll provide a patch to do the same switch for pg_restore
> > shortly.
> >
> > Adding to the commitfest.
> >
>
>
> Updated version with pg_restore included is attached.
Functionality review:
I have tested the backported version of this patch using a 500GB production database with over 200 objects and it worked as specified.
This functionality is extremely useful for the a variety of selective copying of databases, including creating shrunken test instances, ad-hoc parallel dump, differently indexed copies, and sanitizing copies of sensitive data, and even bringing the database up for usage while the indexes are still building.
Note that this feature has the odd effect that some constraints are loaded at the same time as the tables and some are loaded with the post-data. This is consistent with how text-mode pg_dump has always worked, but will seem odd to the user. This also raises the possibility of a future pg_dump/pg_restore optimization.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-11-16 01:26:11 | Re: [PATCH] Unremovable tuple monitoring |
Previous Message | Robert Haas | 2011-11-16 01:17:43 | Re: Group Commit |