Re: pg_sequence catalog

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_sequence catalog
Date: 2016-09-10 11:53:21
Message-ID: CAA4eK1LFPaa=PENjpnXmdf25R0MrW5Nf+eSYqTSCuMd8iN_cUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 1, 2016 at 12:00 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2016-08-31 14:23:41 -0400, Tom Lane wrote:
>> Andres Freund <andres(at)anarazel(dot)de> writes:
>> > On 2016-08-31 13:59:48 -0400, Tom Lane wrote:
>> >> You are ignoring the performance costs associated with eating 100x more
>> >> shared buffer space than necessary.
>>
>> > I doubt that's measurable in any real-world scenario. You seldomly have
>> > hundreds of thousands of sequences that you all select from at a high
>> > rate.
>>
>> If there are only a few sequences in the database, cross-sequence
>> contention is not going to be a big issue anyway.
>
> Isn't that *precisely* when it's going to matter? If you have 5 active
> tables & sequences where the latter previously used independent locks,
> and they'd now be contending on a single lock.
>

I may be missing something here, but why would it contend on a lock,
as per locking scheme proposed by Alvaro, access to sequence object
will need a share lock on buffer page.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-09-10 14:44:50 Re: An extra error for client disconnection on Windows
Previous Message Amit Kapila 2016-09-10 11:32:21 Re: Re: [COMMITTERS] pgsql: Change the way that LWLocks for extensions are allocated.