Modularize log_connections output
authorMelanie Plageman <melanieplageman@gmail.com>
Wed, 12 Mar 2025 15:33:01 +0000 (11:33 -0400)
committerMelanie Plageman <melanieplageman@gmail.com>
Wed, 12 Mar 2025 15:35:21 +0000 (11:35 -0400)
commit9219093cab2607f34ac70612a65430a9c519157f
treee245b0dc191564005192cc596173187ec595ad3e
parentf554a95379a9adef233d21b1e1e8981a8f5f8de3
Modularize log_connections output

Convert the boolean log_connections GUC into a list GUC comprised of the
connection aspects to log.

This gives users more control over the volume and kind of connection
logging.

The current log_connections options are 'receipt', 'authentication', and
'authorization'. The empty string disables all connection logging. 'all'
enables all available connection logging.

For backwards compatibility, the most common values for the
log_connections boolean are still supported (on, off, 1, 0, true, false,
yes, no). Note that previously supported substrings of on, off, true,
false, yes, and no are no longer supported.

Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/flat/CAAKRu_b_smAHK0ZjrnL5GRxnAVWujEXQWpLXYzGbmpcZd3nLYw%40mail.gmail.com
12 files changed:
doc/src/sgml/config.sgml
src/backend/libpq/auth.c
src/backend/postmaster/postmaster.c
src/backend/tcop/backend_startup.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/guc_tables.c
src/backend/utils/misc/postgresql.conf.sample
src/include/postmaster/postmaster.h
src/include/tcop/backend_startup.h
src/include/utils/guc_hooks.h
src/test/authentication/t/001_password.pl
src/tools/pgindent/typedefs.list