Re: PATCH: numeric timestamp in log_line_prefix - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: PATCH: numeric timestamp in log_line_prefix
Date
Msg-id CAMkU=1xaOmKQyCapQMHiJ-8BcyD+m7Q34hhCe1b4AXzXBRjC5w@mail.gmail.com
Whole thread Raw
In response to PATCH: numeric timestamp in log_line_prefix  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On Sat, Mar 21, 2015 at 4:47 PM, Tomas Vondra <tomas.vondra@2ndquadrant.com> 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.

I've wanted this before as well.  But what is the point of %T?  Does printing the milliseconds cause
some kind of detectable performance hit?

I don't think I've ever thought myself "You know, I really wish I hadn't included the milliseconds in that timestamp".

Same question for %t, but that ship has already sailed.

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PATCH: numeric timestamp in log_line_prefix
Next
From: Fabien COELHO
Date:
Subject: Re: PATCH: numeric timestamp in log_line_prefix