pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hans Buschmann <buschmann@nidsa.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: AW: AW: BUG #18147: ERROR: invalid perminfoindex 0 in RTE with relid xxxxx
Date: Mon, 23 Oct 2023 17:05:03 +0000
Message-ID: <3c9fe737f6aa4ae9b0dc19bffd97e106@nidsa.net> (raw)
In-Reply-To: <3319880.1696778678@sss.pgh.pa.us>
References: <18147-6fc796538913ee88@postgresql.org>
	<CAKFQuwYFq-Q2rxbXXBmdHCAEFm-Pu_qhPAEi-PO+LmjtYN2hhg@mail.gmail.com>
	<2796464.1696525626@sss.pgh.pa.us>
	<9fdfed847859435e8641e613198be9e3@nidsa.net>
	<3319880.1696778678@sss.pgh.pa.us>


Hello all,

I finally managed to reproduce the bug on a demo database as shown below.

The file err_demo.sql shows all the steps to reproduce. The table creation is done with errdb_noerr_231008.sql (unchanged from last mail).

The clue is:

- you have an inherited table
- on the archiv part, you have only (one or more) brin indexes
- to reorder the tuples before moving to a new major version (with pg_dumpo/restore) the archiv part is clustered.
 this requires to create a btree index, which is removed immediately after the cluster statement.

when all this has been done, a write access to the archiv-part of the table hierarchy causes the error.

 A direct update access to or_followup_archiv clears the error (as shown in the final comment part of err_demo.sql).

To make the error reappear, you have to redo the 3 recluster steps.

PS: please apply the steps of err_demo.sql manually because it was not tested for full automation.

Hope this enables you to investigate the root cause of the error.

Hans Buschmann
________________________________

Attachments:

  err_demo.sql (application/octet-stream, 3.2K) download

  errdb_noerr_231008.sql (application/octet-stream, 4.3K) download

view thread (19+ messages)  latest in thread

Message-ID: <3c9fe737f6aa4ae9b0dc19bffd97e106@nidsa.net>
Permalink:  ../3c9fe737f6aa4ae9b0dc19bffd97e106@nidsa.net/
Also on:    postgresql.org/message-id/3c9fe737f6aa4ae9b0dc19bffd97e106@nidsa.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: buschmann@nidsa.net, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: AW: AW: BUG #18147: ERROR: invalid perminfoindex 0 in RTE with relid xxxxx
  In-Reply-To: <3c9fe737f6aa4ae9b0dc19bffd97e106@nidsa.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox