Re: Bug in pg_dump/restore -o
От | Bruce Momjian |
---|---|
Тема | Re: Bug in pg_dump/restore -o |
Дата | |
Msg-id | 200201180414.g0I4E3509586@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Bug in pg_dump/restore -o (Philip Warner <pjw@rhyme.com.au>) |
Список | pgsql-hackers |
Philip Warner wrote: > At 21:05 17/01/02 -0500, Tom Lane wrote: > > > >A potentially more serious problem is that if the archiving code chooses > >to issue other operations between the schema restore and data restore > >for the temp table, we might do a \connect and lose the temp table. > > Why is this a problem - I presume I don't understand the OID allocation stuff. The problem is that if you split the creation of the temp table from the actual COPY that loads the data, and there is a reconnection to the server in between, the temp table is automatically deleted, causing the COPY to fail. The trick with this oid setting is the temp table COPY should happen _before_ the schema is created. This way, the pg_class.oid of the newly created schema doesn't match any of the loaded oid's. Now, you can say that the oid counter could wrap around, and that is true, but until we go with the pg_class.oid/table.oid 8-byte unique oid, I would like to keep the oid unique if possible. -- 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 по дате отправления: