pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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:37 +0000
Message-ID: <E1xP8TV-00000000OU8-1Gbg@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_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/079638030a82300fb5d872897d00b522066008a1

Modified Files
--------------
src/backend/replication/logical/logical.c | 46 ++++++++++++++++++++++++-------
src/backend/utils/misc/guc_tables.c       |  2 +-
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(+), 11 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1xP8TV-00000000OU8-1Gbg@gemulon.postgresql.org>
Permalink:  ../E1xP8TV-00000000OU8-1Gbg@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xP8TV-00000000OU8-1Gbg@gemulon.postgresql.org

 · 

reply

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-00000000OU8-1Gbg@gemulon.postgresql.org>
  References: <E1xP8TV-00000000OU8-1Gbg@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