pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedAsunto: Re: Problems restoring a DB with oids
4+ messages / 3 participants
[nested] [flat]
* Asunto: Re: Problems restoring a DB with oids
@ 2004-06-23 10:27 juanmime@ono.com
1 sibling, 0 replies; 4+ messages in thread
From: juanmime@ono.com @ 2004-06-23 10:27 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
>> 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...
The problem continues
I perform this:
pg_restore -Ft -v db.tar -d test -U postgres -S postgres --disable-triggers
And this is the result:
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
¿ Why ? I suppose that the triggers are disabled (-S postgres --disable-triggers),
and I don't understand why pg_restore reports that "large object 609937
does not exist".
Thank you.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Asunto: Re: Problems restoring a DB with oids
@ 2004-06-23 11:43 juanmime@ono.com
1 sibling, 1 reply; 4+ messages in thread
From: juanmime@ono.com @ 2004-06-23 11:43 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
Thanks you very much Tom,
Here is the solution to the problem:
First: We have to restore (only) the structure (schema) of the database
pg_restore -Ft -v -s db.tar -d database_name -U postgres -S postgres --disable-triggers
Second: Restore the datas
pg_restore -Ft -v -a db.tar -d database_name -U postgres -S postgres --disable-triggers
I think, that in the first step, we can drop "-S postgres --disable-triggers"
options.
Thanks.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Asunto: Re: Problems restoring a DB with oids
@ 2004-06-23 15:50 Tom Lane <tgl@sss.pgh.pa.us>
parent: juanmime@ono.com
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2004-06-23 15:50 UTC (permalink / raw)
To: juanmime@ono.com; +Cc: pgsql-admin
juanmime@ono.com writes:
> Here is the solution to the problem:
> First: We have to restore (only) the structure (schema) of the database
> pg_restore -Ft -v -s db.tar -d database_name -U postgres -S postgres --disable-triggers
> Second: Restore the datas
> pg_restore -Ft -v -a db.tar -d database_name -U postgres -S postgres --disable-triggers
[ scratches head... ] Definitely seems that there is a bug in there
somewhere, if you have to do it that way. I'll take a look later ...
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Asunto: Re: Problems restoring a DB with oids
@ 2004-07-11 03:05 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Momjian @ 2004-07-11 03:05 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: juanmime@ono.com; pgsql-admin
Was there ever a resolution to this?
---------------------------------------------------------------------------
Tom Lane wrote:
> juanmime@ono.com writes:
> > Here is the solution to the problem:
> > First: We have to restore (only) the structure (schema) of the database
> > pg_restore -Ft -v -s db.tar -d database_name -U postgres -S postgres --disable-triggers
> > Second: Restore the datas
> > pg_restore -Ft -v -a db.tar -d database_name -U postgres -S postgres --disable-triggers
>
> [ scratches head... ] Definitely seems that there is a bug in there
> somewhere, if you have to do it that way. I'll take a look later ...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2004-07-11 03:05 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-23 10:27 ` juanmime@ono.com
2004-06-23 11:43 ` juanmime@ono.com
2004-06-23 15:50 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-07-11 03:05 ` Bruce Momjian <pgman@candle.pha.pa.us>
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