Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDB7B-0003F7-Ru for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Apr 2019 16:57:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hDB7A-0005PR-Mo for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Apr 2019 16:57:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDB7A-0005PK-Au for pgsql-hackers@lists.postgresql.org; Sun, 07 Apr 2019 16:57:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDB77-0003se-S8 for pgsql-hackers@lists.postgresql.org; Sun, 07 Apr 2019 16:57:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x37GvjwK025276; Sun, 7 Apr 2019 12:57:45 -0400 From: Tom Lane To: Amit Langote cc: PostgreSQL Hackers , Amit Langote Subject: Re: Back-branch bugs with fully-prunable UPDATEs In-reply-to: References: <20710.1554582479@sss.pgh.pa.us> Comments: In-reply-to Amit Langote message dated "Sun, 07 Apr 2019 16:54:19 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25274.1554656265.1@sss.pgh.pa.us> Date: Sun, 07 Apr 2019 12:57:45 -0400 Message-ID: <25275.1554656265@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Langote writes: > On Sun, Apr 7, 2019 at 5:28 AM Tom Lane wrote: >> This test script works fine in HEAD: >> In v11, it suffers an assertion failure in ExecSetupPartitionTupleRouting. >> In v10, it doesn't crash, but we do get >> WARNING: relcache reference leak: relation "parttbl" not closed > What we did in the following commit is behind this: > commit 58947fbd56d1481a86a03087c81f728fdf0be866 > Before this commit, partitioning related code in the executor could > always rely on the fact that ModifyTableState.resultRelInfo[] only > contains *leaf* partitions. As of this commit, it may contain the > root partitioned table in some cases, which breaks that assumption. Ah. Thanks for the diagnosis and patches; pushed. I chose to patch HEAD similarly to v11, even though no bug manifests right now; it seems safer that way. We should certainly have the test case in HEAD, now that we realize there wasn't coverage for this. regards, tom lane