Re: PATCH: numeric timestamp in log_line_prefix

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: numeric timestamp in log_line_prefix
Date: 2015-03-22 19:26:46
Message-ID: CAMkU=1xaOmKQyCapQMHiJ-8BcyD+m7Q34hhCe1b4AXzXBRjC5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 21, 2015 at 4:47 PM, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2015-03-22 19:27:53 Re: PATCH: numeric timestamp in log_line_prefix
Previous Message Fabien COELHO 2015-03-22 19:25:18 Re: PATCH: numeric timestamp in log_line_prefix