Re: Bug in pg_dump/restore -o

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in pg_dump/restore -o
Date: 2002-01-18 04:36:32
Message-ID: 200201180436.g0I4aW412623@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> Given a pg_dump archive containing OIDs, I would expect a schema-only
> >> pg_restore followed by a data-only pg_restore to produce the same end
> >> result as a schema+data restore, no?
>
> > That is the big question, if they are doing a schema-only restore, will
> > then then do a data-only restore, or will they not. My guess is that
> > they will not or they would have just restored the whole thing.
>
> > The downside of setting the oid counter on schema-only is that you have
> > set the counter much higher than they may have wanted, especially if
> > they are doing the schema-only restore to somehow get the counter down
> > again. The downside of _not_ setting the oid counter on schema-only is
> > that they may have duplicate oids between system and user tables. That
> > seems less of a risk than the former, and much less likely to happen.
>
> Good points. So I guess you are saying it would be okay to treat the
> setMaxOid TOC item as data, and have it appear only in schema+data or
> data-only restores. In that case, back to plan A.

Yes, that was my proposal. I was consindering a case where the load the
schema just to populate a fresh database that is to be used by the
application. In such cases, setting the oid makes little sense.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-01-18 04:42:14 pg_upgrade
Previous Message Tom Lane 2002-01-18 04:34:09 Re: Bug in pg_dump/restore -o