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 1mPpVq-0003iX-Sq for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Sep 2021 17:12:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mPpVp-00036j-J9 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Sep 2021 17:12:57 +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 1mPpVp-00036a-BC for pgsql-hackers@lists.postgresql.org; Mon, 13 Sep 2021 17:12:57 +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 1mPpVn-0005F5-69 for pgsql-hackers@lists.postgresql.org; Mon, 13 Sep 2021 17:12:56 +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 18DHCm3K463983; Mon, 13 Sep 2021 13:12:48 -0400 From: Tom Lane To: Alvaro Herrera cc: Amit Kapila , "Drouvot, Bertrand" , PostgreSQL Hackers , Dilip Kumar Subject: Re: [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate() In-reply-to: <202109131652.i2mpy2tgxumt@alvherre.pgsql> References: <202109131652.i2mpy2tgxumt@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 13 Sep 2021 13:52:39 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <463981.1631553168.1@sss.pgh.pa.us> Date: Mon, 13 Sep 2021 13:12:48 -0400 Message-ID: <463982.1631553168@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > Am I the only that that thinks this code is doing far too much in a > PG_CATCH block? You mean the one in ReorderBufferProcessTXN? Yeah, that is mighty ugly. It might be all right given that it almost immediately does AbortCurrentTransaction, since that should basically clean up whatever is wrong. But I'm still full of questions after a brief look at it. * What is the sense in calling RollbackAndReleaseCurrentSubTransaction after having done AbortCurrentTransaction? * Is it really sane that we re-throw the error in some cases and not others? What is likely to catch that thrown error, and is it going to be prepared for us having already aborted the transaction? (It doesn't give me a warm feeling that the code coverage report shows that path to be un-exercised.) regards, tom lane