Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf87f214

Browse files
committed
docs: log_line_prefix session id fix
Restore 4-byte designation for docs. Fix 9.3 doc query to properly padto four digits.Backpatch to all active branchesPer suggestions from Ian Lawrence Barwick
1 parent75d1406 commitf87f214

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 two4-bytehexadecimal numbers separated by a dot.
4093+
The numbersare 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)

[8]ページ先頭

©2009-2025 Movatter.jp