Skip to content

Commit f87f214

Browse files
committed
docs: log_line_prefix session id fix
Restore 4-byte designation for docs. Fix 9.3 doc query to properly pad to four digits. Backpatch to all active branches Per suggestions from Ian Lawrence Barwick
1 parent 75d1406 commit f87f214

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/src/sgml/config.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4089,14 +4089,14 @@ local0.* /var/log/postgresql
40894089
</informaltable>
40904090

40914091
The <literal>%c</> escape prints a quasi-unique session identifier,
4092-
consisting of two hexadecimal numbers separated by a dot. The numbers
4093-
are the process start time and the
4092+
consisting of two 4-byte hexadecimal numbers separated by a dot.
4093+
The numbers are the process start time and the
40944094
process ID, so <literal>%c</> can also be used as a space saving way
40954095
of printing those items. For example, to generate the session
40964096
identifier from <literal>pg_stat_activity</>, use this query:
40974097
<programlisting>
40984098
SELECT to_hex(EXTRACT(EPOCH FROM backend_start)::integer) || '.' ||
4099-
to_hex(pid)
4099+
regexp_replace('0000' || to_hex(pid), '^0*(.*....)$', '\1')
41004100
FROM pg_stat_activity;
41014101
</programlisting>
41024102

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy