Re: log_line_prefix: make it possible to add the search_path - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: log_line_prefix: make it possible to add the search_path
Date
Msg-id 20220725160628.qyinnnignpbwlf2g@alvherre.pgsql
Whole thread Raw
In response to Re: log_line_prefix: make it possible to add the search_path  (Pierre <p.psql@pinaraf.info>)
Responses Re: log_line_prefix: make it possible to add the search_path
List 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/



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: fairywren hung in pg_basebackup tests
Next
From: Ashutosh Sharma
Date:
Subject: Re: making relfilenodes 56 bits