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 1mPpCK-0002wP-0j for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Sep 2021 16:52:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mPpCI-00055a-O4 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Sep 2021 16:52:46 +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 1mPpCI-00055S-G5 for pgsql-hackers@lists.postgresql.org; Mon, 13 Sep 2021 16:52:46 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mPpCF-00025r-Pj for pgsql-hackers@lists.postgresql.org; Mon, 13 Sep 2021 16:52:46 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8380D5C018B; Mon, 13 Sep 2021 12:52:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 13 Sep 2021 12:52:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=CRg+aqir9nIar5QPwZSzykrGqg+ZdI8kodyckqdd42o=; b=XdjBf/Zb FMYf5Jsn0XcO5+8mH4438IWIUK7pIyxXiUzPGj0VF7b9FOl7sAcwZzESzR9K/BtA UJgODNSY76LBTihm4IjBFdNctZ9CyIhWc5GW3FK0TlLterow+jIDmL4rG0wUNqfK W/XOO3Xw3jbgQnpxwoE7QzMgQ+dGG6GN0DWUKcTAIrNFRq6m2OXrK3Lg99Glgbfz 1Kp4FJZeo8BXnNOvwS65c6+L7SLgQYcDseylCUST5vHVytLTcZ+JqFFPNWU1vDPu hMbGa5RB1Z+uA+DfMKqrJOutNChcPPZjmLwqQ3ZlzjYqoHhnWGsoGia9m5DxPIdt j+ZsL73EN79cAA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegjedguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepgeeghfekgfdvtdfhffdtvdevudevjedvtdegudfgleeg leefteegudeihfdttdeknecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh dpshhlrghshhguohhtrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Sep 2021 12:52:41 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 8015A2A085A; Mon, 13 Sep 2021 13:52:39 -0300 (-03) Date: Mon, 13 Sep 2021 13:52:39 -0300 From: Alvaro Herrera To: Amit Kapila Cc: "Drouvot, Bertrand" , PostgreSQL Hackers , Dilip Kumar Subject: Re: [BUG] Failed Assertion in ReorderBufferChangeMemoryUpdate() Message-ID: <202109131652.i2mpy2tgxumt@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Sep-06, Amit Kapila wrote: > The error can occur at multiple places (like via palloc or various > other places) between the first time we subtract the change_size and > add it back after the change is re-computed. I think the correct fix > would be that in the beginning we just compute the change_size by > ReorderBufferChangeSize and then after re-computing the change, we > just subtract the old change_size and add the new change_size. What do > you think? Am I the only that that thinks this code is doing far too much in a PG_CATCH block? -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/ "Those who use electric razors are infidels destined to burn in hell while we drink from rivers of beer, download free vids and mingle with naked well shaved babes." (http://slashdot.org/comments.pl?sid=44793&cid=4647152)