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 @@ -6501,6 +6501,13 @@ local0.* /var/log/postgresql
6501
6501
<sect2 id="runtime-config-logging-what">
6502
6502
<title>What to Log</title>
6503
6503
6504
+ <note>
6505
+ <para>
6506
+ What you choose to log can have security implications; see
6507
+ <xref linkend="logfile-maintenance"/>.
6508
+ </para>
6509
+ </note>
6510
+
6504
6511
<variablelist>
6505
6512
6506
6513
<varlistentry id="guc-application-name" xreflabel="application_name">
@@ -7017,6 +7024,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
7017
7024
planning). Set <varname>log_min_error_statement</varname> to
7018
7025
<literal>ERROR</literal> (or lower) to log such statements.
7019
7026
</para>
7027
+ <para>
7028
+ Logged statements might reveal sensitive data and even contain
7029
+ plaintext passwords.
7030
+ </para>
7020
7031
</note>
7021
7032
</listitem>
7022
7033
</varlistentry>
Original file line number Diff line number Diff line change @@ -958,7 +958,25 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
958
958
It is a good idea to save the database server's log output
959
959
somewhere, rather than just discarding it via <filename>/dev/null</filename>.
960
960
The log output is invaluable when diagnosing
961
- problems. However, the log output tends to be voluminous
961
+ problems.
962
+ </para>
963
+
964
+ <note>
965
+ <para>
966
+ The server log can contain sensitive information and needs to be protected,
967
+ no matter how or where it is stored, or the destination to which it is routed.
968
+ For example, some DDL statements might contain plaintext passwords or other
969
+ authentication details. Logged statements at the <literal>ERROR</literal>
970
+ level might show the SQL source code for applications
971
+ and might also contain some parts of data rows. Recording data, events and
972
+ related information is the intended function of this facility, so this is
973
+ not a leakage or a bug. Please ensure the server logs are visible only to
974
+ appropriately authorized people.
975
+ </para>
976
+ </note>
977
+
978
+ <para>
979
+ Log output tends to be voluminous
962
980
(especially at higher debug levels) so you won't want to save it
963
981
indefinitely. You need to <emphasis>rotate</emphasis> the log files so that
964
982
new log files are started and old ones removed after a reasonable
You can’t perform that action at this time.
0 commit comments