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 @@ -5123,6 +5123,13 @@ local0.* /var/log/postgresql
5123
5123
<sect2 id="runtime-config-logging-what">
5124
5124
<title>What To Log</title>
5125
5125
5126
+ <note>
5127
+ <para>
5128
+ What you choose to log can have security implications; see
5129
+ <xref linkend="logfile-maintenance">.
5130
+ </para>
5131
+ </note>
5132
+
5126
5133
<variablelist>
5127
5134
5128
5135
<varlistentry id="guc-application-name" xreflabel="application_name">
@@ -5565,6 +5572,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
5565
5572
planning). Set <varname>log_min_error_statement</> to
5566
5573
<literal>ERROR</> (or lower) to log such statements.
5567
5574
</para>
5575
+ <para>
5576
+ Logged statements might reveal sensitive data and even contain
5577
+ plaintext passwords.
5578
+ </para>
5568
5579
</note>
5569
5580
</listitem>
5570
5581
</varlistentry>
Original file line number Diff line number Diff line change @@ -947,7 +947,25 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
947
947
It is a good idea to save the database server's log output
948
948
somewhere, rather than just discarding it via <filename>/dev/null</>.
949
949
The log output is invaluable when diagnosing
950
- problems. However, the log output tends to be voluminous
950
+ problems.
951
+ </para>
952
+
953
+ <note>
954
+ <para>
955
+ The server log can contain sensitive information and needs to be protected,
956
+ no matter how or where it is stored, or the destination to which it is routed.
957
+ For example, some DDL statements might contain plaintext passwords or other
958
+ authentication details. Logged statements at the <literal>ERROR</literal>
959
+ level might show the SQL source code for applications
960
+ and might also contain some parts of data rows. Recording data, events and
961
+ related information is the intended function of this facility, so this is
962
+ not a leakage or a bug. Please ensure the server logs are visible only to
963
+ appropriately authorized people.
964
+ </para>
965
+ </note>
966
+
967
+ <para>
968
+ Log output tends to be voluminous
951
969
(especially at higher debug levels) so you won't want to save it
952
970
indefinitely. You need to <emphasis>rotate</> the log files so that
953
971
new log files are started and old ones removed after a reasonable
You can’t perform that action at this time.
0 commit comments