| From: | Jacob Champion <jchampion(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add a check_hook for output_plugin_libraries |
| Date: | 2026-11-06 01:10:37 |
| Message-ID: | E1xP8TV-00000000OUK-1fFS@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(dot)hayato(at)fujitsu(dot)com>
Reported-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Discussion: https://postgr.es/m/CAOYmi%2BkBsG5rNRb1j2VjgTKg8HY90e7vSvZPLeouiAc6nXP9XA%40mail.gmail.com
Backpatch-through: 14
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0c8611c6e7e614ba6cc224a6b819ef2862e46c71
Modified Files
--------------
src/backend/replication/logical/logical.c | 12 ++---------
src/backend/utils/misc/guc.c | 35 ++++++++++++++++++++++++++++++-
src/test/regress/expected/guc.out | 4 ++++
src/test/regress/sql/guc.sql | 3 +++
4 files changed, 43 insertions(+), 11 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-11-06 01:46:17 | pgsql: Revert "Fix use-after-free in COPY (ON_ERROR)" |
| Previous Message | Jacob Champion | 2026-11-06 01:10:36 | pgsql: Add a check_hook for output_plugin_libraries |