Commit 083d8fa7 authored by Bruce Momjian's avatar Bruce Momjian

docs: Improve log_line_prefix session_id query

parent f87f214b
...@@ -4096,7 +4096,7 @@ local0.* /var/log/postgresql ...@@ -4096,7 +4096,7 @@ local0.* /var/log/postgresql
identifier from <literal>pg_stat_activity</>, use this query: identifier from <literal>pg_stat_activity</>, use this query:
<programlisting> <programlisting>
SELECT to_hex(EXTRACT(EPOCH FROM backend_start)::integer) || '.' || SELECT to_hex(EXTRACT(EPOCH FROM backend_start)::integer) || '.' ||
regexp_replace('0000' || to_hex(pid), '^0*(.*....)$', '\1') regexp_replace('0000' || '0133e3', '^0*(.{4,})$', '\1')
FROM pg_stat_activity; FROM pg_stat_activity;
</programlisting> </programlisting>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment