Re: pg_dump --exclude-table-data

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump --exclude-table-data
Date: 2011-11-02 22:02:39
Message-ID: 4EB1BDFF.2060505@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/02/2011 03:15 PM, Josh Berkus wrote:
>> OK, this seems to have some pluses and no negative comments, so it seems
>> worth going forward. Do we want an equivalent pg_restore option?
> I'm not sure it's *as* important for pg_restore, since I can easily use
> a manifest to avoid restoring data for a single table. So I guess it's
> a question of "how hard is it to add it?"
>

The short answer is "more work than I want to put in to this."
pg_restore doesn't have any of pg_dump's infrastructure for handling
table name patterns, nor for excluding tables. So I think all that would
remain a TODO. (A good beginner project, maybe).

A slightly updated patch is attached, the main change being that I
removed use of a short option and only support the long name option.
"-D" didn't seem sufficiently mnemonic to me. I'll add this to the
November commitfest, but I'd like to get it committed ASAP as it will
simplify setting up the -pre and -post data patches.

cheers

andrew

Attachment Content-Type Size
exclude-table-data2.patch text/x-patch 4.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-11-02 22:19:56 Re: heap vacuum & cleanup locks
Previous Message Andrew Dunstan 2011-11-02 21:36:24 Re: psql setenv command