Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index
Date
Msg-id 509915.1687704058@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index
Next
From: Thomas Munro
Date:
Subject: Re: BUG #17990: PSQL Process hangs in parallel mode