| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Cc: | Antonin Houska <ah(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Table AM callback for logical decoding support (REPACK CONCURRENTLY) |
| Date: | 2026-11-20 20:04:19 |
| Message-ID: | awCmfMvOpgtHhXMl@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I suppose as we get more and more external table AMs and functionality
we're going to want more and more booleans to say that an AM supports
this or that. Why not do it just once and invent and interface that
says
uint32 (*relation_supports_feature) (uint32)
so that the code can pass a bunch of TABLEAM_SUPPORTS_FOOBAR flags, and
the routine can fill in the return word with 1 for the features it
supports and 0 for the ones it doesn't? Then the calling code can ask
for just one or more than one, without spending time on determining
whether it supports bits it wasn't asked about, in case some of them are
expensive to determine.
Maybe add more arguments to the callback in case we deem they necessary,
say the Relation itself or whatever.
This would save us in the future having to add more and more callbacks
to add for specific individual bits. tableam.h just defines
TABLEAM_SUPPORTS_LOGICAL_DECODING and so forth, heapam knows to set that
to 1.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Siempre hay que alimentar a los dioses, aunque la tierra esté seca" (Orual)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-11-20 20:06:20 | Re: [PATCH] Fix encoding-dependent LIKE/regex selectivity estimates |
| Previous Message | Antonin Houska | 2026-11-20 19:41:58 | Re: Table AM callback for logical decoding support (REPACK CONCURRENTLY) |