Re: pg_sequence catalog - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pg_sequence catalog
Date
Msg-id 20160831160534.73772m2m4i45bmgo@alap3.anarazel.de
Whole thread Raw
In response to Re: pg_sequence catalog  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: pg_sequence catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2016-08-31 12:56:45 -0300, Alvaro Herrera wrote:
> I was thinking that nextval could grab a shared buffer lock and release
> immediately, just to ensure no one holds exclusive buffer lock
> concurrently (which would be used for things like dropping one seq tuple
> from the page, when a sequence is dropped); then control access to each
> sequence tuple using LockDatabaseObject.  This is a HW lock, heavier
> than a buffer's LWLock, but it seems better than wasting a full 8kb for
> each sequence.

That's going to go be a *lot* slower, I don't think that's ok.  I've a
hard time worrying about the space waste here; especially considering
where we're coming from.

Andres



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_sequence catalog
Next
From: Heikki Linnakangas
Date:
Subject: Re: Optimizing aggregates