Re: [PATCH] Add tests for src/backend/nodes/extensible.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Jan Nidzwetzki <jan(at)planetscale(dot)com>
Cc: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>
Subject: Re: [PATCH] Add tests for src/backend/nodes/extensible.c
Date: 2026-08-31 04:27:55
Message-ID: apUCyzYVYepoBGp8@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 28, 2026 at 12:04:14PM +0200, Jan Nidzwetzki wrote:
> Thanks for the updated patch. Version 5 looks great to me.

Hmm. After studying the patch, I have finished by removing a total of
around 200 lines of comments that felt overly talkative (clearly AI
generated to me), making the whole leaner by retaining the main
information we care about. Same thing has been done in the tests and
the C code.

I also did not understand the need to force installcheck and
_PG_init() requiring to be loaded during shmem setup. The extensible
node and custom scan APIs are fine as long as we load a library,
something done after calling one function or just creating the
extension, so I have removed the s_p_l part and simplified things.

The reloption approach would indeed do not work. I forgot that we do
not have an anchor for table AMs. We should, actually.. That's
annoying to lack this piece of facility while we have these APIs,
perhaps Andrew Dunstan's recent work in this area would work, but I
did not check it.

I still have a small gripe about the requirement of a hardcoded
relation name to trigger a custom scan, but at the end, discarded that
as being an issue (cannot get excited about extending that beyond
non-base relations and such). The module is still useful as a base
template and to provide coverage for the extensible node and custom
scan APIs. After a few more adjustments, the whole result was looking
fine, so applied.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-08-31 04:39:50 Re: [PATCH] Release replication slot on error in SQL-callable slot functions
Previous Message shihao zhong 2026-08-31 03:48:45 [PATCH] pageinspect: validate line pointers before using them