From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_sequence catalog |
Date: | 2016-08-31 13:17:06 |
Message-ID: | 7842a868-0df8-6087-2332-59ba0d6a2210@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
pg_sequence.patch | text/x-patch | 40.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2016-08-31 13:24:13 | Re: [COMMITTERS] pgsql: Fix pg_receivexlog --synchronous |
Previous Message | Michael Banck | 2016-08-31 13:13:43 | Re: Exclude schema during pg_restore |