Re: Removing special case OID generation

Поиск
Список
Период
Сортировка
Искать
От
Simon Riggs
Тема
Re: Removing special case OID generation
Дата
Msg-id
CA+U5nM+AyW6P739Eg+SvNOyuGAcHgw-eHt8gDqrgiKS30w=4XA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Removing special case OID generation Simon Riggs <simon@2ndQuadrant.com>
Re: Removing special case OID generation Alvaro Herrera <alvherre@commandprompt.com>
Re: Removing special case OID generation Jim Nasby <jim@nasby.net>
Re: Removing special case OID generation Simon Riggs <simon@2ndQuadrant.com>
Re: Removing special case OID generation Robert Haas <robertmhaas@gmail.com>
Re: Removing special case OID generation Tom Lane <tgl@sss.pgh.pa.us>
Re: Removing special case OID generation Andres Freund <andres@anarazel.de>
Re: Removing special case OID generation Robert Haas <robertmhaas@gmail.com>
Re: Removing special case OID generation Marti Raudsepp <marti@juffo.org>
Re: Removing special case OID generation Robert Haas <robertmhaas@gmail.com>
Re: Removing special case OID generation Tom Lane <tgl@sss.pgh.pa.us>
On Fri, Feb 10, 2012 at 10:38 PM, Jim Nasby  wrote:
> On 2/7/12 8:14 AM, Alvaro Herrera wrote:
>>
>> Having one sequence for each toast table could be wasteful though.  I
>> mean, sequences are not the best use of shared buffer cache currently.
>> If we could have more than one sequence data in a shared buffer page,
>> things would be different.  Not sure how serious this really is.
>
>
> This would actually be an argument for supporting multiple page sizes... too
> bad that's such a beast.
>
> FWIW, from our most complex production database:
>
> cnuapp_prod@postgres08.obr=# select relkind, count(*) from pg_class group by
> 1;
>  relkind | count
> ---------+-------
>  S       |   522
>  r       |  1058
>  t       |   698
>  i       |  2894
>  v       |   221
>  c       |    12
> (6 rows)


Yeh, I was thinking we would do well to implement cached sequences for
say first 1000 sequences.

That would mean we'd only use a few thousand bytes of memory rather
than 4 MB for your sequences.

Idea would be to make Sequences as fast as OIDs and get rid of the
weird OID code.

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

В списке pgsql-hackers по дате отправления
От: Noah Misch
Дата:
От: Dan Ports
Дата:
FAQ