Re: Sequence Access Methods, round two - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Sequence Access Methods, round two
Date
Msg-id aV3v-mFzKmOPoz7g@paquier.xyz
Whole thread Raw
In response to Re: Sequence Access Methods, round two  (Chao Li <li.evan.chao@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)
Next
From: myzhen
Date:
Subject: Fix incorrect column name in error message for range partition bound check