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 1kuO3Y-0000bR-MF for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Dec 2020 23:05:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kuO3X-00046u-Em for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Dec 2020 23:05:31 +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 1kuO3X-00046n-8Q for pgsql-hackers@lists.postgresql.org; Tue, 29 Dec 2020 23:05:31 +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 1kuO3R-0002TA-4J for pgsql-hackers@lists.postgresql.org; Tue, 29 Dec 2020 23:05: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 0BTN5KnS2240762; Tue, 29 Dec 2020 18:05:21 -0500 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org Subject: Re: Better client reporting for "immediate stop" shutdowns In-reply-to: <1819455.1609185710@sss.pgh.pa.us> References: <559291.1608587013@sss.pgh.pa.us> <20201225230331.hru3u6obyy6j53tk@alap3.anarazel.de> <1293510.1609007835@sss.pgh.pa.us> <20201226191627.nowyox3chvk4mjhk@alap3.anarazel.de> <1730644.1609179914@sss.pgh.pa.us> <20201228191428.p5bhcvd4ixsuyifd@alap3.anarazel.de> <1819455.1609185710@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 28 Dec 2020 15:01:50 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2240760.1609283120.1@sss.pgh.pa.us> Date: Tue, 29 Dec 2020 18:05:20 -0500 Message-ID: <2240761.1609283120@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > I had a thought while looking at elog.c: we could further reduce the risk > of quickdie() crashing if we make it do what elog.c does when it gets into > error recursion trouble: > error_context_stack = NULL; > debug_query_string = NULL; On closer inspection, there's not much need to touch debug_query_string here, because elog.c only consults that for making log entries, which we're suppressing. I pushed it with just the error_context_stack reset. regards, tom lane