Re: Sequence Access Methods, round two

Kirill Reshke <reshkekirill@gmail.com>

From: Kirill Reshke <reshkekirill@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter@eisentraut.org>, Peter Smith <smithpb2250@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-19T05:14:33Z
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

Attachments

On Mon, 18 Aug 2025 at 18:15, I wrote:

> I have a small enhancement to the patch set.


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

But while doing so I noticed another small enhancement for the patch
set. This change is not that big, so attaching as diff.

PFA diff which describes the access method of sequence on \d+ psql
meta-command likewise we do it for tables.

Example:
```
reshke=# \d+ dd
                             Sequence "public.dd"
  Type  | Start | Minimum |       Maximum       | Increment | Cycles? | Cache
--------+-------+---------+---------------------+-----------+---------+-------
 bigint |     1 |       1 | 9223372036854775807 |         1 | no      |     1
Access method: seqlocal

reshke=# \d+ s4
                             Sequence "public.s4"
  Type  | Start | Minimum |       Maximum       | Increment | Cycles? | Cache
--------+-------+---------+---------------------+-----------+---------+-------
 bigint |     1 |       1 | 9223372036854775807 |         1 | no      |     1
Access method: aa
```


-- 
Best regards,
Kirill Reshke