[PATCH] Add a check_hook for output_plugin_libraries

Started by Jacob Champion2 days ago1 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

appliessuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t253850
psql -h localhost -U postgres

Built from patchset v1 (message #1), September 19, 2026 at 09:17 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t253850_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t253850_1 && git checkout t253850_1

Patchset v1 (message #1) is on t253850_1

Jump to latest
#1Jacob Champion
jacob.champion@enterprisedb.com

Hi all,

Fujii-san noted in [1]/messages/by-id/CAHGQGwG81iHN46mY_19Bne5RuKfAjH4dOnQ7-8i=7KYJk_0rAg@mail.gmail.com that the new output_plugin_libraries GUC
doesn't have its syntax validated until it's actually used. This is
only a problem if a DBA/superuser makes a mistake, but it would be
really annoying for them to hit it, and it contradicts an assumption I
made inside the new pg_upgrade check. Attached is a patch to fix that.

This isn't ready for backpatching yet, because the new test is added
in a place that doesn't exist in some of the older branches. I'll look
for a better location, but if anyone has a preference off the bat, let
me know.

For PG20 onwards, I think it'd be really nice to enforce that all
GUC_LIST_QUOTE variables must at least pass SplitGUCList() validation
if they don't provide their own explicit check_hook. We have other
code and comments implying that clients don't have to worry about this
case; an example is in [2]/messages/by-id/CAOYmi+=TomajOOr3OkshSMrNWERAc9fT1je_TEy6Z1UseNy-hA@mail.gmail.com.

Thanks,
--Jacob

[1]: /messages/by-id/CAHGQGwG81iHN46mY_19Bne5RuKfAjH4dOnQ7-8i=7KYJk_0rAg@mail.gmail.com
[2]: /messages/by-id/CAOYmi+=TomajOOr3OkshSMrNWERAc9fT1je_TEy6Z1UseNy-hA@mail.gmail.com

Attachments:

t253850_1
v1-0001-WIP-Add-a-check_hook-for-output_plugin_libraries.patchapplication/octet-stream; name=v1-0001-WIP-Add-a-check_hook-for-output_plugin_libraries.patchDownload+50-1