Re: Setting log_connection in connection string doesn't work

2022-08-17 Thread Bruce Momjian
On Wed, Aug 17, 2022 at 10:29:26AM -0400, Tom Lane wrote: > Bruce Momjian writes: > > This patch is from October of 2021. I don't see any commitfest entry > > for it. Should it be applied? > > I think we decided not to. The original argument for having these > be PGC_SU_BACKEND was to try to e

Re: Setting log_connection in connection string doesn't work

2022-08-17 Thread Tom Lane
Bruce Momjian writes: > This patch is from October of 2021. I don't see any commitfest entry > for it. Should it be applied? I think we decided not to. The original argument for having these be PGC_SU_BACKEND was to try to ensure that you got matching connection and disconnection log entries f

Re: Setting log_connection in connection string doesn't work

2022-08-17 Thread Bruce Momjian
This patch is from October of 2021. I don't see any commitfest entry for it. Should it be applied? --- On Wed, Oct 27, 2021 at 11:53:09AM +0900, Kyotaro Horiguchi wrote: > At Wed, 27 Oct 2021 10:55:31 +0900, Michael Paqui

Re: Setting log_connection in connection string doesn't work

2021-10-26 Thread Kyotaro Horiguchi
At Wed, 27 Oct 2021 10:55:31 +0900, Michael Paquier wrote in > On Wed, Oct 27, 2021 at 10:24:05AM +0900, Kyotaro Horiguchi wrote: > > I don't know. The fact is that it's a superuser-backend variable that > > is silently ignored (but acutally seems to be set in the session). > > Setting log_disco

Re: Setting log_connection in connection string doesn't work

2021-10-26 Thread Michael Paquier
On Wed, Oct 27, 2021 at 10:24:05AM +0900, Kyotaro Horiguchi wrote: > I don't know. The fact is that it's a superuser-backend variable that > is silently ignored (but acutally seems to be set in the session). > Setting log_disconnection the same way works (of course the impliction > of this is far l

Re: Setting log_connection in connection string doesn't work

2021-10-26 Thread Kyotaro Horiguchi
At Tue, 26 Oct 2021 09:39:12 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > > I noticed that the following command doesn't leave connection log in > > log file. > >> psql "host=localhost options=-c\ log_connections=on" > > [ shrug... ] Why would you expect it to? Should "-c log_connec

Re: Setting log_connection in connection string doesn't work

2021-10-26 Thread Tom Lane
Kyotaro Horiguchi writes: > I noticed that the following command doesn't leave connection log in > log file. >> psql "host=localhost options=-c\ log_connections=on" [ shrug... ] Why would you expect it to? Should "-c log_connections=off" be able to hide a connection from the log?

Setting log_connection in connection string doesn't work

2021-10-26 Thread Kyotaro Horiguchi
Hello. I noticed that the following command doesn't leave connection log in log file. > psql "host=localhost options=-c\ log_connections=on" The reason is we log connections before the options is processed. We need to move the code from BackendInitialize to InitPostgres where that options are p