Re: Sequence Access Methods, round two
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, Peter Smith <smithpb2250@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-21T02:57:58Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Refactor init_params() in sequence.c to not use FormData_pg_sequence_data
- ba3d93b2e806 19 (unreleased) landed
-
Fix comment thinko in sequence.c
- 17a3f79f812c 17.0 landed
-
Group more closely cache updates for backends in sequence.c
- 6e951bf98e2e 17.0 landed
-
Introduce sequence_*() access functions
- 449e798c77ed 17.0 landed
Attachments
- v18-0001-Integrate-addition-of-attributes-for-sequences-w.patch (text/x-diff) patch v18-0001
- v18-0002-Refactor-code-for-in-core-local-sequences.patch (text/x-diff) patch v18-0002
- v18-0003-Sequence-access-methods-backend-support.patch (text/x-diff) patch v18-0003
- v18-0004-Sequence-access-methods-dump-restore-support.patch (text/x-diff) patch v18-0004
- v18-0005-Sequence-access-methods-core-documentation.patch (text/x-diff) patch v18-0005
- v18-0006-Refactor-logic-for-page-manipulations-of-sequenc.patch (text/x-diff) patch v18-0006
- v18-0007-snowflake-Add-sequence-AM-based-on-it.patch (text/x-diff) patch v18-0007
On Tue, Aug 19, 2025 at 10:14:33AM +0500, Kirill Reshke wrote: > I played with patch sets some more, trying to break things in nasty > ways (something like CREATE OPERATOR FAMILY ff USING seqlocal or other > incorrect ddl). > But I had no success. I will try some more later, maybe I will find something Thanks. > PFA diff which describes the access method of sequence on \d+ psql > meta-command likewise we do it for tables. Yes, that may be useful, but I don't think that this should use the psql variable to hide table AMs. I am rebasing a new patch set, v18, with a couple of changes: - Added your feedback about psql. - I have put more thoughts into the code shared between the in-core sequence method and the snowflake one, and looked at reducing the duplication between the two. At the end, I have introduced a new header called sequence_page.h, which is able to reduce the work for AMs when these rely on a single page through the addition of macros able to initialize and read sequence pages. In this patch set, this new part is labelled with 0006. - Fixed a few more things, like comments. -- Michael