Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Alanoly Andrews" <alanolya(at)invera(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?
Date: 2015-05-02 17:57:17
Message-ID: a424fd94-8e5f-4e16-90c3-fa16841a07ec@mm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Alanoly Andrews wrote:

> This table does not occur in the listing produced in step 1 above and so
> cannot be edited out

Yes, pg_largeobject is not mentioned but the TOC should have an entry named
BLOBS, as well as other entries related to each large object.

If "BLOBS" is removed or commented, pg_restore -L from that list should not
create any large object into the destination database.

As for the table that contain the "lo" column with the references to large
objects, it can be kept or removed from the restore list, it's up to you, but
it does not determine whether blobs are restored or not.

If the table is kept, its "lo" column will have dangling references to
non-existing large objects, but it's irrelevant for pg_restore, as it doesn't
track those references. You can always update that column to NULL after the
load, or ignore it, or drop it, whatever is more convenient.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jan Lentfer 2015-05-04 12:14:01 Re: pg_dump and pg_restore with multiple streams does Not seem to improve overall times
Previous Message Melvin Davidson 2015-05-02 15:03:27 Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-05-02 19:32:41 Re: plpgsql functions organisation
Previous Message Melvin Davidson 2015-05-02 17:12:08 Re: plpgsql functions organisation