Re: sequence caches

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: sequence caches
Дата
Msg-id 327.1053453161@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: sequence caches  (jks@selectacast.net)
Ответы Re: sequence caches  (jks@selectacast.net)
Re: sequence caches  (Rod Taylor <rbt@rbt.ca>)
Список pgsql-general
jks@selectacast.net writes:
> Is there a way to change the cache setting on a per-query basis?  For that
> matter how can the cache setting be changed at all?  There is no ALTER
> SEQUENCE command.

Rod Taylor added one in CVS tip ... though now that I think about it,
it's highly unlikely that it works in a reasonable fashion in the
presence of caching.  We might have to reconsider whether we should have
it there at all.  Rod, any thoughts about that?  At the very least there
needs to be a warning about the risks in the ALTER SEQUENCE man page.

> How hard would it be to change the backend to lock shared memory only once
> per query?

Seems that would require predicting the future.  How would you know how
many times the sequence would get nextval'd in one query?

            regards, tom lane

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

Предыдущее
От: "Dmitri Bichko"
Дата:
Сообщение: Subqueries and the optimizer
Следующее
От: jks@selectacast.net
Дата:
Сообщение: Re: sequence caches