pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: juanmime@ono.com
Cc: pgsql-admin@postgresql.org
Subject: Re: Problems restoring a DB with oids
Date: Tue, 22 Jun 2004 13:15:35 -0400
Message-ID: <19514.1087924535@sss.pgh.pa.us> (raw)
In-Reply-To: <40D7954B00000651@resmta01.ono.com>
References: <40D7954B00000651@resmta01.ono.com>

juanmime@ono.com writes:
> I do this, from Saturn:
> pg_dump -Ft -b -U dbuser -h saturn dbsample > db.tar
> Then, I create the user and database in Saturno, and perform this:
> pg_restore -Ft -v db.tar -d dbsample -U dbuser
> But, pg_restore stops, showing this message:

> pg_restore: fixing large object cross-references for parts.qltymemdoc
> pg_restore: [archiver (db)] error while updating column "qltymemdoc" of
> table "parts": ERROR: large object 609937 does not exist
> pg_restore: *** aborted because of error

I think what is happening is that dbuser is not a superuser (correct?)
and therefore is unable to disable triggers during the restore.  But
you have to disable the lo_manage trigger to avoid errors, because
lo_manage will think it has to clean up the blob references in the
existing data.

In short: if you are using the LO type then blob restores have to be
done as superuser.  I suppose this oughta be documented someplace...

			regards, tom lane



view thread (2+ messages)

Message-ID: <19514.1087924535@sss.pgh.pa.us>
Permalink:  ../19514.1087924535@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19514.1087924535@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, juanmime@ono.com
  Subject: Re: Problems restoring a DB with oids
  In-Reply-To: <19514.1087924535@sss.pgh.pa.us>
  References: <40D7954B00000651@resmta01.ono.com> <19514.1087924535@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox