diff options
| author | Bruce Momjian | 2009-06-03 00:38:34 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2009-06-03 00:38:34 +0000 |
| commit | 44ead23384bc71b73ad09a078f3ecf08828c68d5 (patch) | |
| tree | 003a1a513a48e5fca72e8c5ed9fdc7835514c765 /doc/src | |
| parent | ade91586ea98f42f9c58ccb1626264777e641fde (diff) | |
Add example of how to generate the session identifier from pg_stat_activity.
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/config.sgml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index ec954b0304b..c0dada727a5 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.217 2009/06/02 17:37:55 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.218 2009/06/03 00:38:34 momjian Exp $ --> <chapter Id="runtime-config"> <title>Server Configuration</title> @@ -3088,7 +3088,14 @@ local0.* /var/log/postgresql consisting of two 4-byte hexadecimal numbers (without leading zeros) separated by a dot. The numbers are the process start time and the process ID, so <literal>%c</> can also be used as a space saving way - of printing those items. + of printing those items. For example, to generate the session + identifier from <literal>pg_stat_activity</>, use: +<programlisting> +SELECT to_hex(EXTRACT(EPOCH FROM backend_start)::integer) || '.' || + to_hex(procpid) +FROM pg_stat_activity; +</programlisting> + </para> <tip> |
