Re: Bug in pg_dump/restore -o

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Bug in pg_dump/restore -o
Дата
Msg-id 200201180430.g0I4Uhq10797@candle.pha.pa.us
обсуждение исходный текст
Ответ на Bug in pg_dump/restore -o  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > My only comment here is that I don't see a need to set the oid counter
> > for a schema-only restore because there are no oid's in the schema dump
> > anyway.
> 
> 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.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: tuptoaster.c must *not* use SnapshotAny
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Bug in pg_dump/restore -o