pg_sequence catalog - Mailing list pgsql-hackers

From Peter Eisentraut
Subject pg_sequence catalog
Date
Msg-id 7842a868-0df8-6087-2332-59ba0d6a2210@2ndquadrant.com
Whole thread Raw
Responses Re: pg_sequence catalog  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
While I was hacking around sequence stuff, I felt the urge to look into
an old peeve: That sequence metadata is not stored in a proper catalog.
Right now in order to find out some metadata about sequences (min, max,
increment, etc.), you need to look into the sequence.  That is like
having to query a table in order to find out about its schema.

There are also known issues with the current storage such as that we
can't safely update the sequence name stored in the sequence when we
rename, so we just don't.

This patch introduces a new catalog pg_sequence that stores the sequence
metadata.  The sequences themselves now only store the counter and
supporting information.

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.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Michael Banck
Date:
Subject: Re: Exclude schema during pg_restore
Next
From: Simon Riggs
Date:
Subject: Re: [COMMITTERS] pgsql: Fix pg_receivexlog --synchronous