From: Tom Lane <tgl@sss.pgh.pa.us>
To: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index
Date: Sun, 25 Jun 2023 10:40:58 -0400
Message-ID: <509915.1687704058@sss.pgh.pa.us> (raw)
In-Reply-To: <17997-a044c27aef95daf8@postgresql.org>
References: <17997-a044c27aef95daf8@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> The following script:
> create table t(a int) partition by range (a);
> create index on t(a);
> create table tp1(a int) partition by range (a);
> create table tp1_1 partition of tp1 for values from (1) to (10);
> create index on only tp1(a);
> alter table t attach partition tp1 for values from (1) to (100);
> create index on tp1_1(a);
> \d+ t
> \d+ tp1
> alter index tp1_a_idx attach partition tp1_1_a_idx;
> ... triggers an assertion failure with the following stack trace:
> #5 0x000055b6a19eb40f in ExceptionalCondition (
> conditionName=0x55b6a1ff8800 "!parentIdx->rd_index->indisvalid",
> fileName=0x55b6a1fea7e0 "tablecmds.c",
> lineNumber=19206) at assert.c:66
> #6 0x000055b6a038ea9d in validatePartitionedIndex
> (partedIdx=0x7fc6e68a3ec8, partedTbl=0x7fc6e68a2368)
> at tablecmds.c:19206
Thanks for the report! This is not new in 16, it reproduces at
least as far back as v11. I suppose we can't simply remove the
assertion, but have to figure out what should happen and write
code for that.
regards, tom lane
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: tgl@sss.pgh.pa.us, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index
In-Reply-To: <509915.1687704058@sss.pgh.pa.us>
* 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