Re: Finer grain log timestamps

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: David Fetter <david(at)fetter(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Finer grain log timestamps
Date: 2022-06-20 15:01:25
Message-ID: 2525299.1655737285@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2022-06-20 15:05:37 Make COPY extendable in order to support Parquet and other formats
Previous Message Robert Haas 2022-06-20 14:04:06 Re: Skipping logical replication transactions on subscriber side