Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8Pnm-0008MO-EU for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Jul 2022 17:24:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o8Pnl-00010b-5k for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Jul 2022 17:24:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8Pnk-00010S-U2 for pgsql-bugs@lists.postgresql.org; Mon, 04 Jul 2022 17:24:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8Pni-0000Lj-MI for pgsql-bugs@lists.postgresql.org; Mon, 04 Jul 2022 17:24:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 264HNftx1596954; Mon, 4 Jul 2022 13:23:41 -0400 From: Tom Lane To: teng_wang13@163.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17538: Dynamically updating log_hostname not affect the disconnection log In-reply-to: <17538-74a88f3ab5b55670@postgresql.org> References: <17538-74a88f3ab5b55670@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Sun, 03 Jul 2022 11:14:03 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1596952.1656955421.1@sss.pgh.pa.us> Date: Mon, 04 Jul 2022 13:23:41 -0400 Message-ID: <1596953.1656955421@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > The parameter could be updated on the fly. However, dynamically updating > log_hostname did not affect the disconnection log. This is operating as designed: the host name is captured at connection time, and the log_disconnection message just repeats it. What you propose would not be an improvement, because it'd make it impossible to match up log_disconnections messages with log_connections ones. regards, tom lane