aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-04-07 10:57:26 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-04-07 11:06:05 -0400
commit3516ea768c92ad0abc16dc4dd97e5eef6eab4237 (patch)
treed15a5f73490851f950891dee762786e330c1a975 /doc/src
parent8f5e419484c3efb613d971ec25b9bf344db3d0b0 (diff)
downloadpostgresql-3516ea768c92ad0abc16dc4dd97e5eef6eab4237.tar.gz
postgresql-3516ea768c92ad0abc16dc4dd97e5eef6eab4237.zip
Add local-address escape "%L" to log_line_prefix.
This escape shows the numeric server IP address that the client has connected to. Unix-socket connections will show "[local]". Non-client processes (e.g. background processes) will show "[none]". We expect that this option will be of interest to only a fairly small number of users. Therefore the implementation is optimized for the case where it's not used (that is, we don't do the string conversion until we have to), and we've not added the field to csvlog or jsonlog formats. Author: Greg Sabino Mullane <htamfids@gmail.com> Reviewed-by: Cary Huang <cary.huang@highgo.ca> Reviewed-by: David Steele <david@pgmasters.net> Reviewed-by: Jim Jones <jim.jones@uni-muenster.de> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAKAnmmK-U+UicE-qbNU23K--Q5XTLdM6bj+gbkZBZkjyjrd3Ow@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index fea683cb49c..a8542fe41ce 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -7690,6 +7690,12 @@ local0.* /var/log/postgresql
<entry>yes</entry>
</row>
<row>
+ <entry><literal>%L</literal></entry>
+ <entry>Local address (the IP address on the server that the
+ client connected to)</entry>
+ <entry>yes</entry>
+ </row>
+ <row>
<entry><literal>%b</literal></entry>
<entry>Backend type</entry>
<entry>no</entry>