Re: pg_restore --no-post-data and --post-data-only - Mailing list pgsql-hackers

From Joshua Berkus
Subject Re: pg_restore --no-post-data and --post-data-only
Date
Msg-id 582950054.139814.1321406354126.JavaMail.root@mail-1.01.com
Whole thread Raw
In response to Re: pg_restore --no-post-data and --post-data-only  ("Andrew Dunstan" <andrew@dunslane.net>)
Responses Re: pg_restore --no-post-data and --post-data-only
List 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
workedas specified. 
 

This functionality is extremely useful for the a variety of selective copying of databases, including creating shrunken
testinstances, ad-hoc parallel dump, differently indexed copies, and sanitizing copies of sensitive data, and even
bringingthe 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
loadedwith 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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Group Commit
Next
From: Robert Haas
Date:
Subject: Re: [PATCH] Unremovable tuple monitoring