Skip to content

Commit 44ead23

Browse files
committed
Add example of how to generate the session identifier from pg_stat_activity.
1 parent ade9158 commit 44ead23

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)
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