Re: PATCH: numeric timestamp in log_line_prefix

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PATCH: numeric timestamp in log_line_prefix
Date: 2015-03-22 01:41:44
Message-ID: 550E1DD8.3040408@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22.3.2015 02:35, Bruce Momjian wrote:
> On Sun, Mar 22, 2015 at 12:47:12AM +0100, Tomas Vondra wrote:
>> 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.
>
> Uh, I think you mean "number" here:
>
> <entry>Time stamp without milliseconds (as a numer)</entry>
> -----

Oh, right, that's a stupid typo.

>
> Also, what "number" do you mean? Unix time since 1970?

Yes, the usual unix timestamp.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2015-03-22 01:46:24 Re: Zero-padding and zero-masking fixes for to_char(float)
Previous Message Jerry Sievers 2015-03-22 01:41:17 Re: Remove fsync ON/OFF as a visible option?