Re: Use of OIDS as primary keys

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: Use of OIDS as primary keys
Дата
Msg-id 3CE114BF.5080708@potentialtech.com
обсуждение исходный текст
Ответ на Use of OIDS as primary keys  (Alan Wayne <alanjwayne@yahoo.com>)
Ответы Re: Use of OIDS as primary keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
>
>>Do they actually save spaces (consider alignment issues and such)?
>
> WITHOUT OIDS doesn't currently save any space --- the tuple header
> layout is the same either way.  It should save a few microseconds
> per row inserted (since you don't have to generate an OID) but
> that's about it.
>
> The main reason for inventing the feature was to postpone OID-counter
> wraparound in large installations.  Wraparound isn't fatal, but can
> be annoying --- for example, pg_dump may get confused about the best
> order to dump tables in.

Thanks Tom.
So the upshot is that using WITHOUT OIDS on tables with primary keys
doesn't hurt a thing.  But it's a good idea to keep OIDS on tables
without primary keys, since it can improve the operation of certain
internal actions.  There are no space consideration because the OID
is part of a (currently) fixed data structure.

Do I understand correctly?

Thanks.

--
Bill Moran
Potential Technology
http://www.potentialtech.com


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

Предыдущее
От: "Robert Abbate"
Дата:
Сообщение: Re: transitioning postgres oid
Следующее
От: "Joel Burton"
Дата:
Сообщение: Re: restoring databases with intensive foreign key use fails