Re: Sequence Access Methods, round two

Chao Li <li.evan.chao@gmail.com>

From: Chao Li <li.evan.chao@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Xuneng Zhou <xunengzhou@gmail.com>, Andrei Lepikhov <lepihov@gmail.com>, Peter Eisentraut <peter@eisentraut.org>, Kirill Reshke <reshkekirill@gmail.com>, Peter Smith <smithpb2250@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-23T06:55:45Z
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 →
  1. Refactor init_params() in sequence.c to not use FormData_pg_sequence_data

  2. Fix comment thinko in sequence.c

  3. Group more closely cache updates for backends in sequence.c

  4. Introduce sequence_*() access functions


> On Dec 19, 2025, at 15:33, Michael Paquier <michael@paquier.xyz> wrote:
> 
> On Fri, Dec 19, 2025 at 02:45:47PM +0800, Xuneng Zhou wrote:
>> Thanks for working on this. I tried to review patch set v25, but I
>> wasn’t able to apply it cleanly on HEAD.
> 
> Strange.  It rebases correctly even on today's HEAD at 5cdbec5aa9dc.
> 
>> We have two macros the same here.
>> 
>> 2. Duplicate stmt->tableElts = NIL; in sequence.c:
> 
> It looks like I have fat-fingered some rebases here.
> 
>> Should we update this to "seq_local_redo: unknown op code %u”?
> 
> Yep, thanks.
> --
> Michael
> <v26-0001-Integrate-addition-of-attributes-for-sequences-w.patch><v26-0002-Refactor-code-for-in-core-local-sequences.patch><v26-0003-Sequence-access-methods-backend-support.patch><v26-0004-Sequence-access-methods-dump-restore-support.patch><v26-0005-Sequence-access-methods-core-documentation.patch><v26-0006-Refactor-logic-for-page-manipulations-of-sequenc.patch><v26-0007-snowflake-Add-sequence-AM-based-on-it.patch>

Hi Michael,

I just started to review this patch. While reviewing 0001, I got the point where you now add the 3 attributes into pg_attributes, so I tried to test this behavior, but a basic “create sequence” command failed for me:
```
evantest=# create sequence ts1 start with 1 increment by 1 cache 10 cycle;
ERROR:  access method "seqlocal" does not exist
```

Did I do something wrong?

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/