mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 00:03:23 -04:00
docs: Improve log_line_prefix session_id query
This commit is contained in:
parent
f87f214b7c
commit
083d8fa79d
@ -4096,7 +4096,7 @@ local0.* /var/log/postgresql
|
||||
identifier from <literal>pg_stat_activity</>, use this query:
|
||||
<programlisting>
|
||||
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;
|
||||
</programlisting>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user