Re: Sequence Access Methods, round two

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Sequence Access Methods, round two
Date: 2025-12-18 04:52:45
Message-ID: aUOInWcmLQciRQYU@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 13, 2025 at 08:51:32AM +0900, Michael Paquier wrote:
> Err, no. It's the opposite here: code cleanups and file splits are
> cleaner if they happen first, not after the implementations as these
> lead to less code churn overall. Splitting the sequence "core" logic
> and WAL logic make sense in the long-term to me anyway, as a separate
> refactoring piece. It's true that 0002 could be slightly different,
> though, we could for example keep sequence.c where it is now in
> src/backend/commands/ without forcing the use of the term "AM" in the
> file names, and extract the WAL pieces of it into a new file (aka the
> redo and marking routines). Then it's only a game of moving the files
> around depending on the follow-up pieces. I should probably post a
> patch for that separately, this has been bugging me a bit in terms of
> code separation clarity for the sequence RMGR.

Since this update, the code related to the sequence RMGR has been
moved around with a87987cafca6. This makes the rebased version of the
patch leaner, with a cleaner split between the WAL and "core"
computation logic, as v24 and older patch sets submitted on this
thread were splitting this code already.

Anyway. Rebased. v25. Attached.
--
Michael

Attachment Content-Type Size
v25-0001-Integrate-addition-of-attributes-for-sequences-w.patch text/x-diff 11.2 KB
v25-0002-Refactor-code-for-in-core-local-sequences.patch text/x-diff 57.2 KB
v25-0003-Sequence-access-methods-backend-support.patch text/x-diff 64.9 KB
v25-0004-Sequence-access-methods-dump-restore-support.patch text/x-diff 21.8 KB
v25-0005-Sequence-access-methods-core-documentation.patch text/x-diff 9.5 KB
v25-0006-Refactor-logic-for-page-manipulations-of-sequenc.patch text/x-diff 7.8 KB
v25-0007-snowflake-Add-sequence-AM-based-on-it.patch text/x-diff 25.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rahila Syed 2025-12-18 05:01:31 Re: Segmentation fault on proc exit after dshash_find_or_insert
Previous Message Michael Paquier 2025-12-18 04:47:01 Re: Fix and improve allocation formulas