Re: Exporting Table-Specified BLOBs Only?

From: "Braunstein, Alan" <alan_braunstein(at)mentor(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Exporting Table-Specified BLOBs Only?
Date: 2014-07-24 11:56:34
Message-ID: 51EC62B37DBCF043ACF78AEC6EA6B726013DB1D2DF@NA-MBX-03.mgc.mentorg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The reason this is needed from the export/dump side is that the database can become huge due to the number of datasheets added to the database. These datasheets are not necessary to troubleshoot the setup and, sometimes, the datasheets are secure-sensitive. In either case, they're not necessary when we need a copy of the customer's database to troubleshoot and they make the transport and import of the database horribly time consuming.

Thanks for the response. Hopefully this can be addressed one day.

Cheers.

-----Original Message-----
From: Robert Haas [mailto:robertmhaas(at)gmail(dot)com]
Sent: Thursday, July 24, 2014 7:31 AM
To: Braunstein, Alan
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Exporting Table-Specified BLOBs Only?

On Mon, Jul 21, 2014 at 2:14 PM, Braunstein, Alan <alan_braunstein(at)mentor(dot)com> wrote:
> What do I need?
>
> A method of using pg_dump to selectively export BLOBs with OID’s used
> in the tables specified with --table <table_name1> --table
> <table_name2>

Hmm. If you take a full backup using pg_dump -Fc, you can then use pg_restore -l and pg_restore -L to find and selectively restore whatever objects you want; e.g. restore the tables first, then fetch the list of OIDs from the relevant columns and restore those particular blobs.

But I don't think we've got a tool built into core for doing this kind of filtering on the dump side.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-07-24 12:18:50 Re: Some bogus results from prairiedog
Previous Message Michael Paquier 2014-07-24 11:40:51 Re: Production block comparison facility