pgsql: Add a check_hook for output_plugin_libraries
pgsql: Add a check_hook for output_plugin_libraries
От:
Jacob Champion <jchampion@postgresql.org>
Дата:
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 Reported-by: Fujii Masao Reviewed-by: Hayato Kuroda Discussion: https://postgr.es/m/CAOYmi%2BkBsG5rNRb1j2VjgTKg8HY90e7vSvZPLeouiAc6nXP9XA%40mail.gmail.com Backpatch-through: 14 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d0571ca1609e4cb6c9d31c7137b67e4002641fa6 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(-)