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

Commit44ead23

Browse files
committed
Add example of how to generate the session identifier from pg_stat_activity.
1 parentade9158 commit44ead23

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.217 2009/06/02 17:37:55 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.218 2009/06/03 00:38:34 momjian Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -3088,7 +3088,14 @@ local0.* /var/log/postgresql
30883088
consisting of two 4-byte hexadecimal numbers (without leading zeros)
30893089
separated by a dot. The numbers are the process start time and the
30903090
process ID, so <literal>%c</> can also be used as a space saving way
3091-
of printing those items.
3091+
of printing those items. For example, to generate the session
3092+
identifier from <literal>pg_stat_activity</>, use:
3093+
<programlisting>
3094+
SELECT to_hex(EXTRACT(EPOCH FROM backend_start)::integer) || '.' ||
3095+
to_hex(procpid)
3096+
FROM pg_stat_activity;
3097+
</programlisting>
3098+
30923099
</para>
30933100

30943101
<tip>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp