Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qveIV-006PJk-FW for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Oct 2023 13:51:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qveIT-004DTb-5m for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Oct 2023 13:51:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qveIS-004DRU-SZ for pgsql-bugs@lists.postgresql.org; Wed, 25 Oct 2023 13:51:44 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qveIK-002ef6-Ad for pgsql-bugs@lists.postgresql.org; Wed, 25 Oct 2023 13:51:43 +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 39PDpVrl967242; Wed, 25 Oct 2023 09:51:31 -0400 From: Tom Lane To: Amit Langote cc: Hans Buschmann , Peter Geoghegan , "David G. Johnston" , "pgsql-bugs@lists.postgresql.org" Subject: Re: AW: AW: BUG #18147: ERROR: invalid perminfoindex 0 in RTE with relid xxxxx In-reply-to: References: <18147-6fc796538913ee88@postgresql.org> <2796464.1696525626@sss.pgh.pa.us> <9fdfed847859435e8641e613198be9e3@nidsa.net> <3319880.1696778678@sss.pgh.pa.us> <3c9fe737f6aa4ae9b0dc19bffd97e106@nidsa.net> <408285.1698085850@sss.pgh.pa.us> <428393.1698094765@sss.pgh.pa.us> <556852.1698158932@sss.pgh.pa.us> <839708.1698174464@sss.pgh.pa.us> Comments: In-reply-to Amit Langote message dated "Wed, 25 Oct 2023 17:16:22 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <967240.1698241891.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 25 Oct 2023 09:51:31 -0400 Message-ID: <967241.1698241891@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Amit Langote writes: > On Wed, Oct 25, 2023 at 4:07 AM Tom Lane wrote: >> I suspect that now this should just unconditionally clear >> childrte->perminfoindex, but it's minor cleanup not a bug fix >> so I didn't pursue that in the initial patch. > Would you like me to apply something like the attached? Diff looks fine, but I'm not sure that it's appropriate to characterize the existing code as an oversight. It was a necessary hack while the executor was behaving as it did (ie, using the first child as root). >> * It seems like ModifyTable.nominalRelation and >> ModifyTable.rootRelation are pretty darn redundant. Maybe we >> should make an effort to get rid of one of them. Or maybe >> it's not worth the trouble. > We had a discussion on unifying the two before: > https://www.postgresql.org/message-id/12148.1538938507%40sss.pgh.pa.us Ah, so we did. The "serve different masters" argument did re-occur to me while I was looking at this yesterday, but I'm not sure how strong it is really. Anyway, I'm also content to leave it be. regards, tom lane