Re: sequence caches
От | jks@selectacast.net |
---|---|
Тема | Re: sequence caches |
Дата | |
Msg-id | Pine.LNX.4.44.0305201311330.11027-100000@p1.selectacast.net обсуждение исходный текст |
Ответ на | Re: sequence caches (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: sequence caches
|
Список | pgsql-general |
On Tue, 20 May 2003, Tom Lane wrote: > Joseph Shraibman <jks@selectacast.net> writes: > > The way I understand it is a sequence cache works by getting more than one sequence id > > from the sequence at once, which saves shared memory locking. My question: If I make a > > query like: > > SELECT NEXTVAL('seqname'),NEXTVAL('seqname'),NEXTVAL('seqname'); > > ... will that lock shared memory 3 times or just once? > > 3 times, unless you changed the default cache setting. > 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. How hard would it be to change the backend to lock shared memory only once per query?
В списке pgsql-general по дате отправления: