From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: David Fetter <david@fetter.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Subject: Re: Finer grain log timestamps
Date: Mon, 20 Jun 2022 11:01:25 -0400
Message-ID: <2525299.1655737285@sss.pgh.pa.us> (raw)
In-Reply-To: <20220620110514.athzygshxtln3yt6@alvherre.pgsql>
References: <20220620110514.athzygshxtln3yt6@alvherre.pgsql>
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Do we *have* to provide support for arbitrary numbers of digits, though?
> We could provide support for only %.3t and %.6t specifically, and not
> worry about other cases (error: width not supported).
If I were coding it, I would allow only exactly 1 digit (%.Nt) to simplify
the parsing side of things and bound the required buffer size. Without
having written it, it's not clear to me whether further restricting the
set of supported values would save much code. I will point out, though,
that throwing an error during log_line_prefix processing will lead
straight to infinite recursion.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, david@fetter.org, robertmhaas@gmail.com
Subject: Re: Finer grain log timestamps
In-Reply-To: <2525299.1655737285@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox