agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Antonin Houska <ah@cybertec.at>
To: alvherre@kurilemu.de
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Zsolt Parragi <zsolt.parragi@percona.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Subject: Re: table AM option passing
Date: Thu, 02 Apr 2026 07:39:43 +0200
Message-ID: <4287.1775108383@localhost> (raw)
In-Reply-To: <202604011827.p4mx4bh2ti46@alvherre.pgsql>
References: <202604011827.p4mx4bh2ti46@alvherre.pgsql>

Álvaro Herrera <alvherre@kurilemu.de> wrote:

> On 2026-Apr-01, Antonin Houska wrote:

> I realized that patch 0003 is doing two different things, and they
> should each be their own patch which can be rejected if we don't like
> them; so I split it in two.  One moves the heapam.h-private bit to the
> 32th bit.

I'm sorry I haven't recalled yesterday, but this technique resembles the
DSM keys in parallel.c:


  /*
   * Magic numbers for per-context parallel state sharing.  Higher-level code
   * should use smaller values, leaving these very large ones for use by this
   * module.
   */
  #define PARALLEL_KEY_FIXED		UINT64CONST(0xFFFFFFFFFFFF0001)
  ...


What I found inspiring here is that the "core" uses the high bits while users
of the API use the lower ones. Perhaps it'd be appropriate in v6-0001 to
reserve the high bits for the TABLE_ options and leave the lower ones for the
HEAP_ options. If someone implements a new AM (possibly as an extension), it
should be more comfortable for him.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com





view thread (17+ messages)

Message-ID: <4287.1775108383@localhost>
Permalink:  ../4287.1775108383@localhost/
Also on:    postgresql.org/message-id/4287.1775108383@localhost

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ah@cybertec.at, alvherre@kurilemu.de, li.evan.chao@gmail.com, andres@anarazel.de, pgsql-hackers@lists.postgresql.org, zsolt.parragi@percona.com, nathandbossart@gmail.com
  Subject: Re: table AM option passing
  In-Reply-To: <4287.1775108383@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox