From ba79cb5dc841104cf4810b5c23af4f881079dbb5 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Wed, 11 Dec 2019 18:03:35 -0300 Subject: Emit parameter values during query bind/execute errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes such log entries more useful, since the cause of the error can be dependent on the parameter values. Author: Alexey Bashtanov, Álvaro Herrera Discussion: https://postgr.es/m/0146a67b-a22a-0519-9082-bc29756b93a2@imap.cc Reviewed-by: Peter Eisentraut, Andres Freund, Tom Lane --- doc/src/sgml/config.sgml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 53ac14490a1..5d1c90282f9 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -6595,6 +6595,29 @@ log_line_prefix = '%m [%p] %q%u@%d/%a ' + + log_parameters_on_error (boolean) + + log_parameters_on_error configuration parameter + + + + + Controls whether bind parameters are logged when a statement is logged + as a result of . + It adds some overhead, as postgres will compute and store textual + representations of parameter values in memory for all statements, + even if they eventually do not get logged. + This setting has no effect on statements logged due to + or + settings, as they are always logged + with parameters. + The default is off. + Only superusers can change this setting. + + + + log_statement (enum) -- cgit v1.2.3