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

From Pierre Ducroquet
Subject log_line_prefix: make it possible to add the search_path
Date
Msg-id 3366542.QJadu78ljV@peanuts2
Whole thread Raw
Responses Re: log_line_prefix: make it possible to add the search_path
Re: log_line_prefix: make it possible to add the search_path
List pgsql-hackers
Hello

I'm working on several databases where schemas are used to differentiate the 
tenants.
This is great for performance, but several tools are lacking around this 
usecase by not showing the schema, one of them being log_line_prefix.
It is possible to work around this using the application_name, but a mistake 
on the application side would be fatal, while the search_path would still 
indicate the real tables used in a query.
The attached patch implements this, using %S. I've not written the 
documentation yet, since I'm not sure this would be acceptable as is, or if a 
more "generic" method should be used (I thought of %{name} to fetch an 
arbitrary GUC, but did not implement due to a lack of need for that feature)



Attachment

pgsql-hackers by date:

Previous
From: Martin Kalcher
Date:
Subject: Re: [PATCH] Introduce array_shuffle() and array_sample()
Next
From: Japin Li
Date:
Subject: Typo in misc_sanity.sql?