From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PATCH: numeric timestamp in log_line_prefix |
Date: | 2015-08-22 06:39:36 |
Message-ID: | alpine.DEB.2.10.1508220839000.30043@sto |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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?
It seems to me that always having milliseconds "123456789.012" would be
fine, it can easily be filtered out if not necessary or would be there if
useful, so maybe just one more format is enough.
--
Fabien.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-08-22 14:14:48 | Re: Reducing ClogControlLock contention |
Previous Message | Noah Misch | 2015-08-22 06:23:02 | Re: Autonomous Transaction is back |