Re: Reset oid , starting value=1 -- Max. Number of OID

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Reset oid , starting value=1 -- Max. Number of OID
Дата
Msg-id 20031209195409.GA16791@svana.org
обсуждение исходный текст
Ответ на Re: Reset oid , starting value=1 -- Max. Number of OID  ("Gellert, Andre" <AGellert@ElectronicPartner.de>)
Список pgsql-general
On Tue, Dec 09, 2003 at 02:52:35PM +0100, Gellert, Andre wrote:
> > The only way to reset oids is to destroy the entire data directory and
> > initdb again. In recent versions you can create tables
> > without oids, thus
> > reducing their usage.
>
> Today we have oid's > 2147483647 , what happens, if we have more than
> allowed ? I remember it was about 4 billions max. oid's, will Postgres
> refresh itself or will it produce errors like "max. records inserted" ???

The OIDs will wrap around, yes. The only real effect is that you run a
really small risk that a CREATE TABLE or some such will fail. Ofcourse, OIDs
will no longer be unique then, but one should never assume they are in the
first place.

> PS: My solution : I moved the applications data to another server ;-) with
> only 1.970.230.087 used OIDs , the application is being fixed at the moment
> (a typecast to int is used on nearly every page).

Are you using it as a primary key?
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> (... have gone from d-i being barely usable even by its developers
> anywhere, to being about 20% done. Sweet. And the last 80% usually takes
> 20% of the time, too, right?) -- Anthony Towns, debian-devel-announce

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: PSQL 7.4 on debian woody
Следующее
От: Arjen van der Meijden
Дата:
Сообщение: Re: Making a tree with "millions and millions" of dynamic