Re: pg_sequence catalog - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pg_sequence catalog
Date
Msg-id 20160831183002.acmwkaovaigm4tjb@alap3.anarazel.de
Whole thread Raw
In response to Re: pg_sequence catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_sequence catalog
Re: pg_sequence catalog
List pgsql-hackers
On 2016-08-31 14:23:41 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.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.  If you have hundreds of
thousands of active sequences, I doubt individual page locks would
become a point of contention.

Andres



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_sequence catalog
Next
From: Serge Rielau
Date:
Subject: Re: autonomous transactions