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 1kG735-00085U-3f for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2020 20:50:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kG731-0008Qk-M2 for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2020 20:50:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kG731-0008Qd-FH for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2020 20:50:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kG72z-0007Ur-9i for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2020 20:50:30 +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 089KoQlG113531; Wed, 9 Sep 2020 16:50:26 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org Subject: Re: SIGQUIT handling, redux In-reply-to: <110116.1599682140@sss.pgh.pa.us> References: <1850884.1599601164@sss.pgh.pa.us> <20200909192620.dylomoxknmt6rdb3@alap3.anarazel.de> <110116.1599682140@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 09 Sep 2020 16:09:00 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <113529.1599684626.1@sss.pgh.pa.us> Date: Wed, 09 Sep 2020 16:50:26 -0400 Message-ID: <113530.1599684626@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Not only DNS, but all the various auth libraries would have to be > contended with. Lots of work there compared to the likely rewards. Wait a minute. The entire authentication cycle happens inside InitPostgres, using the backend's normal signal handlers. So maybe we are overthinking the problem. What if we simply postpone ProcessStartupPacket into that same place, and run it under the same rules as we do for authentication? We would waste more cycles than we do now for the case where the client closes the connection without sending a startup packet, but not enormously so, I think --- and optimizing that case doesn't seem like a high-priority goal anyway. And cases like DNS lookup taking forever don't seem like any more of an issue than auth lookup taking forever. regards, tom lane