Re: PATCH: numeric timestamp in log_line_prefix

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: numeric timestamp in log_line_prefix
Date: 2015-08-22 15:48:40
Message-ID: 55D899D8.9030605@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 08/22/2015 08:39 AM, Fabien COELHO wrote:
>
> Hello Tomas,
>
>> 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.
>
> Are you planing to update this patch? I was wanting to use it for some
> tests and figured out that it had stayed as a proposal, too bad.
>
> I would suggest to maybe follow Tom's %u idea and fix the implementation
> details wrt to comments received?

Yes, I plan to update it according to those comments.

regards

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-08-22 16:06:07 Re: (full) Memory context dump considered harmful
Previous Message Heikki Linnakangas 2015-08-22 14:24:52 Re: New functions