pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Prevent remote notices from repeating local query details in log 2+ messages / 1 participants [nested] [flat]
* pgsql: Prevent remote notices from repeating local query details in log @ 2026-09-28 09:54 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2026-09-28 09:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Prevent remote notices from repeating local query details in logs Since 112faf1378ee, NOTICE, WARNING, and similar messages received through dblink, postgres_fdw, and replication connections have been logged with ereport(LOG). With the default log_min_error_statement setting, each such log entry can also include the current local SQL statement. An active error-context callback can add local CONTEXT information as well. Repeating these fields for every remote message increases log volume and processing overhead. Use errhidestmt() and errhidecontext() when logging these messages to prevent the local STATEMENT and CONTEXT fields, when present, from being repeated for each remote message in the server log. Reported-by: Merlin Moncure <mmoncure@gmail.com> Author: Vignesh C <vignesh21@gmail.com Reviewed-by: Merlin Moncure <mmoncure@gmail.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CAHyXU0yDwOYkWpRi=gtpDwjBxVqeaezgkgZLRWm2p1_FgaiPFQ@mail.gmail.com Backpatch-though: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/6a2edf2a1e6d0c277b7ddf9604fe5b83766cc8e1 Modified Files -------------- src/include/libpq/libpq-be-fe-helpers.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Prevent remote notices from repeating local query details in log @ 2026-09-28 09:54 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2026-09-28 09:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Prevent remote notices from repeating local query details in logs Since 112faf1378ee, NOTICE, WARNING, and similar messages received through dblink, postgres_fdw, and replication connections have been logged with ereport(LOG). With the default log_min_error_statement setting, each such log entry can also include the current local SQL statement. An active error-context callback can add local CONTEXT information as well. Repeating these fields for every remote message increases log volume and processing overhead. Use errhidestmt() and errhidecontext() when logging these messages to prevent the local STATEMENT and CONTEXT fields, when present, from being repeated for each remote message in the server log. Reported-by: Merlin Moncure <mmoncure@gmail.com> Author: Vignesh C <vignesh21@gmail.com Reviewed-by: Merlin Moncure <mmoncure@gmail.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CAHyXU0yDwOYkWpRi=gtpDwjBxVqeaezgkgZLRWm2p1_FgaiPFQ@mail.gmail.com Backpatch-though: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/23da62e98a7c33977134e8d0318d109fca3a8954 Modified Files -------------- src/include/libpq/libpq-be-fe-helpers.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-09-28 09:54 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-09-28 09:54 pgsql: Prevent remote notices from repeating local query details in log Fujii Masao <fujii@postgresql.org> 2026-09-28 09:54 pgsql: Prevent remote notices from repeating local query details in log Fujii Masao <fujii@postgresql.org>
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