Re: sequence caches - Mailing list pgsql-general

From Tom Lane
Subject Re: sequence caches
Date
Msg-id 25984.1053403595@sss.pgh.pa.us
Whole thread Raw
In response to sequence caches  (Joseph Shraibman <jks@selectacast.net>)
Responses Re: sequence caches  (jks@selectacast.net)
List pgsql-general
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.

            regards, tom lane

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: infinite trigger loop
Next
From: Tom Lane
Date:
Subject: Re: ERROR: Memory exhausted in AllocSetAlloc(188)