Re: Export log_line_prefix(); useful for emit_log_hook.

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Export log_line_prefix(); useful for emit_log_hook.
Date: 2022-06-29 05:32:31
Message-ID: 96bad2085dce2585fc747e20eba0aec4364cd371.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2022-06-29 at 10:17 +0900, Michael Paquier wrote:
> On Tue, Jun 28, 2022 at 11:52:56AM -0700, Jeff Davis wrote:
> > Patch attached. Some kinds of emit log hooks might find it useful
> > to
> > also compute the log_line_prefix.
>
> Have you played with anything specific that would require that? I
> am fine to expose this routine, being mostly curious about what kind
> of recent format implemented with the elog hook would use it.

Just a slightly different format that is directly digestible by another
system, while still preserving what the original messages in the file
would look like.

There are other ways to do it, but it's convenient. If we use, e.g.,
csv or json format, we lose the log_line_prefix and would need to
regenerate it from the individual fields.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dong Wook Lee 2022-06-29 05:38:12 Add test of pg_prewarm extenion
Previous Message Jeff Davis 2022-06-29 05:17:17 Re: Hardening PostgreSQL via (optional) ban on local file system access