Re: Why hash OIDs?
От
Thomas Munro
Тема
Re: Why hash OIDs?
Дата
Msg-id
CAEepm=1yuCKJ9MFZzUjPcykjP6q9OqsjjO7pEmLiGezrmM1XMA@mail.gmail.com
Ответ на
Re: Why hash OIDs? (Thomas Munro)
Список
Дерево обсуждения
Why hash OIDs? Thomas Munro <thomas.munro@enterprisedb.com>
Re: Why hash OIDs? Andres Freund <andres@anarazel.de>
Re: Why hash OIDs? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why hash OIDs? Thomas Munro <thomas.munro@enterprisedb.com>
Re: Why hash OIDs? Andres Freund <andres@anarazel.de>
Re: Why hash OIDs? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why hash OIDs? Thomas Munro <thomas.munro@enterprisedb.com>
Re: Why hash OIDs? Robert Haas <robertmhaas@gmail.com>
Re: Why hash OIDs? Thomas Munro <thomas.munro@enterprisedb.com>
Re: Why hash OIDs? Thomas Munro <thomas.munro@enterprisedb.com>
Re: Why hash OIDs? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why hash OIDs? Robert Haas <robertmhaas@gmail.com>
On Wed, Aug 29, 2018 at 11:05 AM Thomas Munro wrote: > On Wed, Aug 29, 2018 at 2:09 AM Robert Haas wrote: > > rhaas=# create table a (x serial primary key); > > CREATE TABLE > > rhaas=# create table b (x serial primary key); > > CREATE TABLE > > rhaas=# select 'a'::regclass::oid, 'b'::regclass::oid; > > oid | oid > > -------+------- > > 16422 | 16430 > > (1 row) > > > > If you have a lot of tables like that, bad things are going to happen > > to your hash table. > > Right. I suppose that might happen accidentally when creating a lot > of partitions. > > Advance the OID generator by some prime number after every CREATE TABLE? > > /me ducks Erm, s/prime/random/. Or use a different OID generator for each catalogue so that attributes etc don't create gaps in pg_class OIDs. -- Thomas Munro http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата: