Large object restore problem w/triggers - Mailing list pgsql-general

From Claire McLister
Subject Large object restore problem w/triggers
Date
Msg-id A7B179B6-7451-4325-A67F-41C21CA16C2C@zeesource.net
Whole thread Raw
Responses Re: Large object restore problem w/triggers
List pgsql-general
Hi,

  We have a database with a bunch of large objects, who's ids we
reference in a table. There is a trigger associated with inserts and
updates on the table to delete the old value when inserting a new
large object associated with a row in the table.

  This causes a problem when doing a pg_dump and pg_restore. The dump
works fine, but when doing a restore it tries to trigger a delete of
an old large object. It seems that the object id is associated with
the database that was dumped, and not the one that was restored. So,
lo_unlink fails and the whole restore aborts.

  Has anyone seen this behavior before? Am I doing something wrong?
Is there a workaround for this?

  Thanks for your help.

Claire

PS. The dump command was pg_dump --b -Ft -o db > db.tar
         Restore command: pg_restore -O -d db db.tar

  --
  Claire McLister                        mclister@zeesource.net
  1684 Nightingale Avenue     Suite 201
  Sunnyvale, CA 94087            408-733-2737(fax)

                      http://www.zeemaps.com



pgsql-general by date:

Previous
From: Chris Browne
Date:
Subject: Re: Plans for 8.2?
Next
From: Tom Lane
Date:
Subject: Re: Large object restore problem w/triggers