Re: sequence caches

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: sequence caches
Date: 2003-05-20 04:06:35
Message-ID: 25984.1053403595@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joseph Shraibman <jks(at)selectacast(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-05-20 04:58:41 Re: ERROR: Memory exhausted in AllocSetAlloc(188)
Previous Message Gianni Mariani 2003-05-20 03:37:41 Re: are views obsolete ?