Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xCJvo-00000003iqE-3ENa for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Oct 2026 16:46:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xCJvn-00000007xMg-3IHO for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Oct 2026 16:46:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xCJvm-00000007xMX-3ULo for pgsql-hackers@lists.postgresql.org; Thu, 01 Oct 2026 16:46:51 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xCJvj-00000002Ioy-0nid for pgsql-hackers@lists.postgresql.org; Thu, 01 Oct 2026 16:46:50 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id B8C481D00123 for ; Thu, 1 Oct 2026 12:46:44 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 01 Oct 2026 12:46:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm3; t=1790873203; x= 1790959603; bh=P9pEpZ19ML6ijDQ/OpEIxpiYV+/bzVQ6dwUFgD8nQZA=; b=M Dr556JOVMOc+Dor/iZZW7XwiF9v/TDafXBuccnco0K73elEnxFEU5bTC3asYBWcu uydp1WYpQI4n9zPRN/57rXWLwUy2BtmDT1fqRCW1j6p7IPZk+v731W9Y3ZhiEA9Q VSfwl2jhNVH1DIC7zUnUPt1RGrv0Xa0ZJdydqKoymp2kyta8MR542NLFFXcI8FJw u4UVkDfXNpOlEYMiGhHCIrAG2WtzoBy5iT6BhABHFLemL/AMxXIlRYRb0NSINsUq lqnsXiS+U2/EnBb4Uz7VJ9xRcRykZYwAAgKEyhtopVO9uRRHbu657siKf/vvPgco fMlbljTeiMs4JIv4+bUkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1790873203; x=1790959603; bh=P 9pEpZ19ML6ijDQ/OpEIxpiYV+/bzVQ6dwUFgD8nQZA=; b=r5HL6PW7KC6DreL/P cHU4Jj5j2KvCL89IOmBHPHIn6Yb68irRqZppKEJFwMSUBH//WLhJTzom5h3Q7kin Z2m0FAGX8OYsFTy36p0L4RUOPGN7gwavFfrF8cYxso1+nurnAN23kSKKGmP5kRWy 7G7/chey/8FbLMoszyIt6Z6dlL2XnjwZynIBzWgO58/oUaZgTMs0BEi2xNme0RAd 0lmjsek6Rmb1A99IcqOL7GyMMJAf5PNJ0VU3iws+4X/d6pkO29It5Jm5lkaEd5Tq jSM6kWDJcxWB6OgpWuQbj3BoevRbckCUwsSH+6hcUMtGP5hOKIldlWVeXzgKqeBH sPFXw== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06; repo=github.com/dkim2wg/interop; date=2026-09-30; sw=lmtpprox; action=sign d=kurilemu.de a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1790873203; d=kurilemu.de; mf=PGFsdmhlcnJlQGt1cmlsZW11LmRlPg==; rt=PHBnc3FsLWhhY2tlcnNAbGlzdHMucG9zdGdyZXNxbC5vcmc+; s=fm3:rsa-sha256:q/BXNYwk1Zkx0fj8M3Y43NtX2HJrlJKPPhIX7Ek4sGvH6EL EzlS7gk2JrcQbh385wGPZfODg5kPy7HRuKBlSmME3M7NsXAf4WMW9Jxw+WsEqe8+ 7AzxpYPdKW8BHELkCfCThTLUgxh5Avydg2FPOy7Flq4UK2wZBXCACF+dD5Jtj9Ao 3bru7Zeb9U0fXN/xTqbTST5vXLu7vCQzQS500o6UwkKT/knliEc1/TT0ASVNvGG4 3kfG/oIuBR311LGlRjzwul2m2utUK+wIYRM8QqXG2IlDq5F1FgYhL8+zYQQS6xbf 2r+qmPUSBjj6aZmYvqnA6USYucuI2lAulfPTLjw==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06; repo=github.com/dkim2wg/interop; date=2026-09-30; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-transfer-encoding, content-type,date,feedback-id,from,in-reply-to,message-id, mime-version,subject,to; Message-Instance: m=1; h=sha256:y/LVutwUK87ovo2mZUVQqycrMDf0VJS0w3j2iZHpNSc=:Q4bGr6cjZWAwnNHkBXkzZyJ2sfcdxJnvCRGQE0clAwI=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEBb2WjLh77gQJUybBFtAtYTf0Vz6+d/kGA1qdeyuNgQ8pKawyB+K3N19m8IM3i9S yFCLPkz3dsiLGyCtGXyJtnLGEVcg6dyvHTYrTlXxwOxfLdd5dniRq2/MpsM8bPV2vqzliD Q2C/ujkpSUlIIkOhJLfLJgHVLHSh/S6hxdUWBj45gfRmGejFrsqJ4D2IqyGDfqMisT3BVW ooBU0t0JEjjci/T3ow+oOuluDyTltWj1DFei3S2kxVKmNg+AckBbqVaN9scQyx5bBQrfwN ATCJIflEkR3kxBO1SybbFxkfW+wgy/gypuS+1jAHv8s25d21cRAPwMk2z/D4KmzhYfsmft uVgdssEzDqu1iy/u2uKNSdKz7mRYnfRR3WfC8kn2sTpYxw2rD4SNRL2BacoVYs0s1iVBtW 4PvgYJR5R2bP90WEfeQJZbxTa4UjkZmOedsbNomcuwdxrl+auftfWad5KhFRW6Wwvi2+S2 FHzR9aRtsjD7n189er0eNQe5MOxS9pAjNiBcJMD+ww6B5ZKjHgR4ki1RXA6/2VmhsX2Ebl U6uW7/3zlYyzoKOyLXPmwlTag/4+HlPgp6sOZWi/bLRoVrIpRjp+GrQbf3yexoIF/OYhgQ dsl4ukEPwgrk9F0eKr8Xg+86WRJBeC8jV4bU+ZGxVasastMlMkZV8MM4AgSg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Oct 2026 12:46:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1790866662; bh=Q4bGr6cjZWAwnNHkBXkzZyJ2sfcdxJnvCRGQE0clAwI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=pVaofHuk2xkjiaV0IBmEGCeFgzytJziS+BtmBuP7NMygAeZgBeY8kxXxrMjiawz8A EEqFC3HAEiAE14FcLp+BqrKoh6QtrDaTdkTINS++WMfxvOx92i1bbaWv1E7FgDGPsw Xjx/m9pr881Rd9YQc17Eex+Ej55Juh0EnxUmPNkDT6yVJISx/9avDzZ8zciUpq7Z3x JApCatnKegan+uMxbPXunIo0if9pA4EfzKkgpfoUlIkvfTVsy6+0JlUj6x8WPdjfg4 wilbxiMn2vzFinbCDvEg4qG2de76AWOaGlezORVYaje5soJbb22T+ShndkhZip3nlE E7O2RjvKiscIw== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 6EAFFB00043; Thu, 01 Oct 2026 16:57:42 +0200 (CEST) Date: Thu, 1 Oct 2026 16:57:42 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Andrew Dunstan Cc: Ajit Awekar , Aleksander Alekseev , pgsql-hackers@lists.postgresql.org, Junwang Zhao , Zsolt Parragi , Rafia Sabih , Julien Tachoires Subject: Re: Allow table AMs to define their own reloptions Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Sep-30, Andrew Dunstan wrote: > diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h > index ea3f2a6be99..6dfc6e8026c 100644 > --- a/src/include/access/tableam.h > +++ b/src/include/access/tableam.h > @@ -17,6 +17,7 @@ > #ifndef TABLEAM_H > #define TABLEAM_H > > +#include "access/amapi.h" > #include "access/relscan.h" > #include "access/sdir.h" > #include "access/xact.h" I don't love this. I have a bunch of patches queued to remove includes from other includes to reduce cross-header contamination. This kind of change makes it impossible to remove the cross inclusion here and is more or less a step backwards. (It's not _too_ bad because tableam.h is not as widely used Is there a better way to have a function definition that can be used in both amapi.h and tableam.h without this cross-header inclusion? Other comments on verbiage, just passing by: I'm not much in love with the LLM-written comments TBH -- I don't think phrases like "owns the option set entirely" are valuable, for example. Also, the comment just above the ATValidateAccessMethodOptions() call in ATController is redundant: it would be enough to say "validate options as needed", and then have the comment atop ATValidateAccessMethodOptions() itself carry the explanation of what we do and why. In tableam.sgml, I'm not sure it makes much sense to state "The callback has the same signature as the corresponding index AM callback". Why not just say what the signature is without directing the user to read a reference page that's not relevant to the topic of table AMs? I think the first mention of reloptions in that page should be . It also talks about validating and throwing ereport(ERROR) but it doesn't say in so many words what must happen or not happen on each possible value of 'validate'. It could be clearer. There's also "raises an error rather than silently dropping the value". I mean, why not say "rather than launching an ICBM"? Why not just "raises an error, period"? If I were the user of such an AM, I would not be sure how to interpret the phrase "validate that the option read with SELECT reloptions FROM pg_class are the ones that will be used". What does that mean exactly? Should it say "examine" rather than "validate"? -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "No me acuerdo, pero no es cierto. No es cierto, y si fuera cierto, no me acuerdo." (Augusto Pinochet a una corte de justicia)