File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -6242,6 +6242,13 @@ local0.* /var/log/postgresql
6242
6242
<sect2 id="runtime-config-logging-what">
6243
6243
<title>What to Log</title>
6244
6244
6245
+ <note>
6246
+ <para>
6247
+ What you choose to log can have security implications; see
6248
+ <xref linkend="logfile-maintenance"/>.
6249
+ </para>
6250
+ </note>
6251
+
6245
6252
<variablelist>
6246
6253
6247
6254
<varlistentry id="guc-application-name" xreflabel="application_name">
@@ -6684,6 +6691,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
6684
6691
planning). Set <varname>log_min_error_statement</varname> to
6685
6692
<literal>ERROR</literal> (or lower) to log such statements.
6686
6693
</para>
6694
+ <para>
6695
+ Logged statements might reveal sensitive data and even contain
6696
+ plaintext passwords.
6697
+ </para>
6687
6698
</note>
6688
6699
</listitem>
6689
6700
</varlistentry>
Original file line number Diff line number Diff line change @@ -939,7 +939,25 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
939
939
It is a good idea to save the database server's log output
940
940
somewhere, rather than just discarding it via <filename>/dev/null</filename>.
941
941
The log output is invaluable when diagnosing
942
- problems. However, the log output tends to be voluminous
942
+ problems.
943
+ </para>
944
+
945
+ <note>
946
+ <para>
947
+ The server log can contain sensitive information and needs to be protected,
948
+ no matter how or where it is stored, or the destination to which it is routed.
949
+ For example, some DDL statements might contain plaintext passwords or other
950
+ authentication details. Logged statements at the <literal>ERROR</literal>
951
+ level might show the SQL source code for applications
952
+ and might also contain some parts of data rows. Recording data, events and
953
+ related information is the intended function of this facility, so this is
954
+ not a leakage or a bug. Please ensure the server logs are visible only to
955
+ appropriately authorized people.
956
+ </para>
957
+ </note>
958
+
959
+ <para>
960
+ Log output tends to be voluminous
943
961
(especially at higher debug levels) so you won't want to save it
944
962
indefinitely. You need to <emphasis>rotate</emphasis> the log files so that
945
963
new log files are started and old ones removed after a reasonable
You can’t perform that action at this time.
0 commit comments