PATCH: numeric timestamp in log_line_prefix

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PATCH: numeric timestamp in log_line_prefix
Date: 2015-03-21 23:47:12
Message-ID: 550E0300.8040502@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

from time to time I need to correlate PostgreSQL logs to other logs,
containing numeric timestamps - a prime example of that is pgbench. With
%t and %m that's not quite trivial, because of timezones etc.

I propose adding two new log_line_prefix escape sequences - %T and %M,
doing the same thing as %t and %m, but formatting the value as a number.

Patch attached, I'll add it to CF 2015-06.

regards

--
Tomas Vondra http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
log-line-prefix-numeric-timestamp.patch text/x-diff 2.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-03-22 01:02:54 Display of multi-target-table Modify plan nodes in EXPLAIN
Previous Message Andrew Gierth 2015-03-21 23:46:48 Re: INT64_MIN and _MAX