From: Jacob Champion <jchampion@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add a check_hook for output_plugin_libraries
Date: Fri, 06 Nov 2026 01:10:36 +0000
Message-ID: <E1xP8TV-00000000OTr-0iv0@gemulon.postgresql.org> (raw)
Add a check_hook for output_plugin_libraries
I omitted explicit syntax validation of output_plugin_libraries in
226e49cbed. [ALTER SYSTEM] SET does this implicitly due to the parser
grammar, but a DBA could still accidentally put a bad value into
postgresql.conf, and a superuser could do the same with connection
options or set_config(). Logical replication would then fail later on.
This is an annoying papercut for a security option to have, so reject
these cases immediately in a check_hook.
Tests by Hayato Kuroda.
Co-authored-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reported-by: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAOYmi%2BkBsG5rNRb1j2VjgTKg8HY90e7vSvZPLeouiAc6nXP9XA%40mail.gmail.com
Backpatch-through: 14
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/aad7261318c95c6a79c832e378f539b05fc15b2e
Modified Files
--------------
src/backend/replication/logical/logical.c | 46 ++++++++++++++++++++++++-------
src/backend/utils/misc/guc_parameters.dat | 1 +
src/include/utils/guc_hooks.h | 2 ++
src/test/regress/expected/guc.out | 4 +++
src/test/regress/sql/guc.sql | 3 ++
5 files changed, 46 insertions(+), 10 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: jchampion@postgresql.org
Subject: Re: pgsql: Add a check_hook for output_plugin_libraries
In-Reply-To: <E1xP8TV-00000000OTr-0iv0@gemulon.postgresql.org>
References: <E1xP8TV-00000000OTr-0iv0@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox