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 1qpVfC-0061NH-2f for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Oct 2023 15:25:50 +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 1qpVeA-007LvO-Fh for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Oct 2023 15:24:47 +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 1qpVeA-007LvG-6g for pgsql-bugs@lists.postgresql.org; Sun, 08 Oct 2023 15:24:47 +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 1qpVe6-000wLc-S3 for pgsql-bugs@lists.postgresql.org; Sun, 08 Oct 2023 15:24:46 +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 398FOc413319881; Sun, 8 Oct 2023 11:24:38 -0400 From: Tom Lane To: Hans Buschmann cc: "David G. Johnston" , "pgsql-bugs@lists.postgresql.org" Subject: Re: AW: BUG #18147: ERROR: invalid perminfoindex 0 in RTE with relid xxxxx In-reply-to: <9fdfed847859435e8641e613198be9e3@nidsa.net> References: <18147-6fc796538913ee88@postgresql.org> ,<2796464.1696525626@sss.pgh.pa.us> <9fdfed847859435e8641e613198be9e3@nidsa.net> Comments: In-reply-to Hans Buschmann message dated "Sun, 08 Oct 2023 13:16:52 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3319879.1696778678.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 08 Oct 2023 11:24:38 -0400 Message-ID: <3319880.1696778678@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hans Buschmann writes: > For your reference I include a simple dump of a test case database, whic= h executes the queries but does NOT reproduce the error. > This case seems much more complicated then I thought on first view. Hmm. The most likely explanation for the error sometimes appearing and sometimes not is that it depends on the shape of the selected query plan, which in turn would depend on current pg_statistics contents. Perhaps you could devise some dummy data that would repro the issue and you could share with us? regards, tom lane