Re: log_line_prefix: make it possible to add the search_path

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Pierre <p(dot)psql(at)pinaraf(dot)info>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: log_line_prefix: make it possible to add the search_path
Date: 2022-07-25 16:06:28
Message-ID: 20220725160628.qyinnnignpbwlf2g@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-Jul-25, Pierre wrote:

> On Monday, July 25, 2022 11:52:41 AM CEST Alvaro Herrera wrote:

> > It seems that this would be too noisy to be truly usable. What if we
> > emitted a log line when the variable changed, and the value that's in
> > use when the connection starts?
>
> Then the log files would be filled by these messages, only to be able to make
> use of the few slow queries that are logged during the day.

Ah, yeah, that's not useful for that case ...

> Or it would need to be a log before each slow query. I'm not sure how
> well it would work.

... and this would probably be prohibitively complex to implement and
use, as well as too slow for the high traffic case.

Maybe your idea of allowing arbitrary GUCs is not a bad one, something
like
%{search_path}G
(where we add a letter at the end just so we can add other things in the
future that aren't GUCs.)

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2022-07-25 16:21:27 Re: making relfilenodes 56 bits
Previous Message Andrew Dunstan 2022-07-25 16:02:57 Re: fairywren hung in pg_basebackup tests