Large Object leakage

From: Harald Fuchs <hari(dot)fuchs(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Large Object leakage
Date: 2010-04-01 11:12:29
Message-ID: pumxxnl942.fsf@srv.protecting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a DB (mydb) where one table (mytbl) contains a large object
column. The contents are managed by contrib/lo. This breaks when I
want to copy the DB to another host where the schema is already
present with some old contents: when I do

pg_dump -c mydb | psql -q -h otherhost mydb -f -

pg_dump emits a "DROP TABLE mytbl" which leaves the old lo contents on
otherhost orphaned and, even worse, raises an exception if pg_dump
wants to create a large object with an id already present. I thought
about a TRUNCATE TRIGGER which could make the appropriate lo_unlink
calls, but this trigger won't be called by DROP TABLE.

Any ideas?

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2010-04-01 11:15:10 Re: "1-Click" installer problems
Previous Message Alban Hertroys 2010-04-01 11:05:52 Re: prevent connection using pgpass.conf