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 @@ -5406,6 +5406,13 @@ local0.* /var/log/postgresql
5406
5406
<sect2 id="runtime-config-logging-what">
5407
5407
<title>What To Log</title>
5408
5408
5409
+ <note>
5410
+ <para>
5411
+ What you choose to log can have security implications; see
5412
+ <xref linkend="logfile-maintenance"/>.
5413
+ </para>
5414
+ </note>
5415
+
5409
5416
<variablelist>
5410
5417
5411
5418
<varlistentry id="guc-application-name" xreflabel="application_name">
@@ -5848,6 +5855,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
5848
5855
planning). Set <varname>log_min_error_statement</varname> to
5849
5856
<literal>ERROR</literal> (or lower) to log such statements.
5850
5857
</para>
5858
+ <para>
5859
+ Logged statements might reveal sensitive data and even contain
5860
+ plaintext passwords.
5861
+ </para>
5851
5862
</note>
5852
5863
</listitem>
5853
5864
</varlistentry>
Original file line number Diff line number Diff line change @@ -948,7 +948,25 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
948
948
It is a good idea to save the database server's log output
949
949
somewhere, rather than just discarding it via <filename>/dev/null</filename>.
950
950
The log output is invaluable when diagnosing
951
- problems. However, the log output tends to be voluminous
951
+ problems.
952
+ </para>
953
+
954
+ <note>
955
+ <para>
956
+ The server log can contain sensitive information and needs to be protected,
957
+ no matter how or where it is stored, or the destination to which it is routed.
958
+ For example, some DDL statements might contain plaintext passwords or other
959
+ authentication details. Logged statements at the <literal>ERROR</literal>
960
+ level might show the SQL source code for applications
961
+ and might also contain some parts of data rows. Recording data, events and
962
+ related information is the intended function of this facility, so this is
963
+ not a leakage or a bug. Please ensure the server logs are visible only to
964
+ appropriately authorized people.
965
+ </para>
966
+ </note>
967
+
968
+ <para>
969
+ Log output tends to be voluminous
952
970
(especially at higher debug levels) so you won't want to save it
953
971
indefinitely. You need to <emphasis>rotate</emphasis> the log files so that
954
972
new log files are started and old ones removed after a reasonable
You can’t perform that action at this time.
0 commit comments