Setting log_connection in connection string doesn't work - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Setting log_connection in connection string doesn't work
Date
Msg-id 20211026.173350.2163793213857103911.horikyota.ntt@gmail.com
Whole thread Raw
Responses Re: Setting log_connection in connection string doesn't work  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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 processed if we want that option to work.  However,
I'm not sure we can delay connection-log until that point, since that
movement changes the meaning of the log message.

Another option is to log connections in InitPostgres if not yet and
log_connections is turned on by connection options.

Futher another option is we don't make it work and write in the
document that it doesn't work. (I didn't find that, but...)


Opinions and suggestions are welcome.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: when the startup process doesn't (logging startup delays)
Next
From: Daniel Gustafsson
Date:
Subject: Re: [PATCH] Fix memory corruption in pg_shdepend.c