| 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:36 |
| Message-ID: | E1xP8TV-00000000OTn-0VdT@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
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/161d5ffcc5c2f446df528bd273de822b86965d92
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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jacob Champion | 2026-11-06 01:10:37 | pgsql: doc: Improve output_plugin_libraries documentation |
| Previous Message | Richard Guo | 2026-11-06 00:54:29 | Re: pgsql: Fix infinite loop in first_value()/nth_value() with IGNORE NULLS |