Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxsAR-00CgCz-4S for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Apr 2024 17:36:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rxsAO-004DBZ-NW for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Apr 2024 17:36:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxsAO-004DBR-EQ for pgsql-hackers@lists.postgresql.org; Fri, 19 Apr 2024 17:36:52 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxsAH-001qT5-Ph for pgsql-hackers@lists.postgresql.org; Fri, 19 Apr 2024 17:36:51 +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 43JHaYk82174636; Fri, 19 Apr 2024 13:36:34 -0400 From: Tom Lane To: Japin Li cc: PostgreSQL Hackers , Song JinZhou Subject: Re: Support event trigger for logoff In-reply-to: References: Comments: In-reply-to Japin Li message dated "Fri, 19 Apr 2024 23:46:10 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2174634.1713548194.1@sss.pgh.pa.us> Date: Fri, 19 Apr 2024 13:36:34 -0400 Message-ID: <2174635.1713548194@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Japin Li writes: > I see [1] has already implemented on login event trigger, why not implement > the logoff event trigger? What happens if the session crashes, or otherwise fails unexpectedly? > Here is a problem with the regression test when using \c to create a new > session, because it might be running concurrently, which may lead to the > checking being unstable. > Any thoughts? Let's not go there at all. I don't think there's enough field demand to justify dealing with this concept. regards, tom lane