Re: pg_sequence catalog - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_sequence catalog
Date
Msg-id 18723.1472652110@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_sequence catalog  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: pg_sequence catalog  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pg_sequence catalog  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Craig Ringer <craig@2ndquadrant.com> writes:
> On 31 August 2016 at 21:17, Peter Eisentraut
> <peter.eisentraut@2ndquadrant.com> wrote:
>> I don't know if this is a net improvement.  Maybe this introduces as
>> many new issues as it removes.  But I figured I'll post this, so that at
>> least we can discuss it.

> This will change behaviour subtly.

Uh, not as subtly as all that, because "select * from sequence" will
now return a different set of columns, which will flat out break a
lot of clients that use that method to get sequence properties.

In previous discussions of this idea, we had speculated about turning
sequences into, effectively, views, so that we could still return all
the same columns --- only now some of them would be coming from a
catalog rather than the non-transactional per-sequence storage.
I'm not sure how feasible that is, but it's worth thinking about.

Personally, my big beef with the current approach to sequences is that
we eat a whole relation (including a whole relfilenode) per sequence.
I wish that we could reduce a sequence to just a single row in a
catalog, including the nontransactional state.  Not sure how feasible
that is either, but accomplishing it would move the benefits of making
a change out of the "debatable whether it's worth it" category, IMO.
        regards, tom lane



pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: some requests on auditing
Next
From: Daniel Gustafsson
Date:
Subject: Re: Leftover member in openssl part of Port struct