Re: Sequence Access Methods, round two

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Xuneng Zhou <xunengzhou(at)gmail(dot)com>, Andrei Lepikhov <lepihov(at)gmail(dot)com>, 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: 2026-01-07 05:32:42
Message-ID: aV3v-mFzKmOPoz7g@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 26, 2025 at 02:41:01PM +0800, Chao Li wrote:
> Then that has to be documented clearly. Meaning that, if a user
> chooses to use a non-default sequence AM, then UNLOGGED might not
> work, I don’t see a mechanism to enforce a custom AM to honor
> UNLOGGED.

Perhaps. At the end, I am not sure if we really need to get down to
that in the docs. It is really up to an AM to decide what should
happen depending on the relpersistence of the Relation.

> Should the macro comment documents something like: “to use this
> macro, the caller must define the following variables 1) Buffer
> buf;, 2) Page page;, 3) seam_speical *sm;” If we use a function, the
> interface is clear; to use a macro, the interface and dependencies
> are not that clear, so more documentation is needed.

I think that's pretty obvious once one uses this code, as they would
likely use the example module in contrib/ as a base for their own
work. :)

For now, I am sending a rebased v28. This stuff needed a refresh.
--
Michael

Attachment Content-Type Size
v28-0001-Integrate-addition-of-attributes-for-sequences-w.patch text/x-diff 11.2 KB
v28-0002-Refactor-code-for-in-core-local-sequences.patch text/x-diff 56.4 KB
v28-0003-Sequence-access-methods-backend-support.patch text/x-diff 65.3 KB
v28-0004-Sequence-access-methods-dump-restore-support.patch text/x-diff 21.8 KB
v28-0005-Sequence-access-methods-core-documentation.patch text/x-diff 9.5 KB
v28-0006-Refactor-logic-for-page-manipulations-of-sequenc.patch text/x-diff 7.8 KB
v28-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 myzhen 2026-01-07 05:44:46 Fix incorrect column name in error message for range partition bound check
Previous Message Michael Paquier 2026-01-07 05:15:40 Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)