From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Doug McNaught <doug(at)wireboard(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org, Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
Subject: | Re: Backing up databases with large objects DOESN'T WORK? |
Date: | 2002-02-07 23:22:22 |
Message-ID: | 20025.1013124142@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Doug McNaught <doug(at)wireboard(dot)com> writes:
> *The 'loid' fields in the pg_largeobject table are different after the
> restore!*
Yup.
> This of course breaks the references to pg_largeobject in my other
> tables.
pg_restore is supposed to take care of fixing those for you. If that
failed, we should investigate why.
> $ pg_dump -b -Fc mydb > outfile
> $ dropdb mydb
> $ createdb mydb
> $ pg_restore -d mydb < outfile
> pg_restore: [archiver (db)] could not execute query: ERROR: function plpgsql_call_handler already exists with same argument types
Hmm, do you have plpgsql installed into template1? You are supposed to
use template0 as the template when creating a database to be restored
by pg_restore.
It occurs to me that pg_restore shouldn't necessarily abandon ship after
getting an SQL error. The normal behavior of a SQL-script-type pg_dump
dump is that it'll keep plugging after an error, and this frequently
is good not bad (eg, GRANTs to nonexistent users shouldn't abort the
restore).
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Doug McNaught | 2002-02-07 23:38:04 | Re: Backing up databases with large objects DOESN'T WORK? |
Previous Message | Darren Ferguson | 2002-02-07 23:20:56 | Re: what is the best way to backup? |