summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2021-04-20 12:57:59 -0400
committerBruce Momjian <bruce@momjian.us>2021-04-20 12:57:59 -0400
commitdb01f797dd48f826c62e1b8eea70f11fe7ff3efc (patch)
tree27d7fee01e588057811570e3f67832ce9c0e4d0b /doc/src
parent9660834dd8bf5b093f7b49eef846666201d45a35 (diff)
Fix interaction of log_line_prefix's query_id and log_statement
log_statement is issued before query_id can be computed, so properly clear the value, and document the interaction. Reported-by: Fujii Masao, Michael Paquier Discussion: https://postgr.es/m/YHPkU8hFi4no4NSw@paquier.xyz Author: Julien Rouhaud
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 776ab1a8c8b..dd7ebe7a9da 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -7139,6 +7139,16 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
</programlisting>
</para>
</tip>
+
+ <note>
+ <para>
+ The <literal>%Q</literal> escape always reports a zero identifier
+ for lines output by <xref linkend="guc-log-statement"/> because
+ <varname>log_statement</varname> generates output before an
+ identifier can be calculated, including invalid statements for
+ which an identifier cannot be calculated.
+ </para>
+ </note>
</listitem>
</varlistentry>