diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/indexing.out /tmp/cirrus-ci-build/src/test/modules/test_plan_advice/tmp_check/results/indexing.out --- /tmp/cirrus-ci-build/src/test/regress/expected/indexing.out 2026-04-23 01:21:03.327610945 +0000 +++ /tmp/cirrus-ci-build/src/test/modules/test_plan_advice/tmp_check/results/indexing.out 2026-04-23 01:34:27.845239664 +0000 @@ -559,13 +559,14 @@ ERROR: division by zero select relname, indisvalid from pg_class join pg_index on indexrelid = oid where relname like 'idxpart%' order by relname; - relname | indisvalid ---------------------+------------ - idxpart11_expr_idx | f - idxpart1_expr_idx | f - idxpart2_expr_idx | t - idxpart_expr_idx | f -(4 rows) + relname | indisvalid +--------------------------+------------ + idxpart11_expr_idx | f + idxpart11_expr_idx_ccaux | f + idxpart1_expr_idx | f + idxpart2_expr_idx | t + idxpart_expr_idx | f +(5 rows) -- attach the indexes; parents stay invalid alter index idxpart1_expr_idx attach partition idxpart11_expr_idx; @@ -573,13 +574,14 @@ alter index idxpart_expr_idx attach partition idxpart2_expr_idx; select relname, indisvalid from pg_class join pg_index on indexrelid = oid where relname like 'idxpart%' order by relname; - relname | indisvalid ---------------------+------------ - idxpart11_expr_idx | f - idxpart1_expr_idx | f - idxpart2_expr_idx | t - idxpart_expr_idx | f -(4 rows) + relname | indisvalid +--------------------------+------------ + idxpart11_expr_idx | f + idxpart11_expr_idx_ccaux | f + idxpart1_expr_idx | f + idxpart2_expr_idx | t + idxpart_expr_idx | f +(5 rows) -- fix the index on the leaf partition delete from idxpart11 where b = 0; @@ -612,24 +614,28 @@ ERROR: division by zero select relname, indisvalid from pg_class join pg_index on indexrelid = oid where relname like 'idxpart%' order by relname; - relname | indisvalid --------------------+------------ - idxpart1_expr_idx | f - idxpart2_expr_idx | f - idxpart_expr_idx | f -(3 rows) + relname | indisvalid +-------------------------+------------ + idxpart1_expr_idx | f + idxpart1_expr_idx_ccaux | f + idxpart2_expr_idx | f + idxpart2_expr_idx_ccaux | f + idxpart_expr_idx | f +(5 rows) -- attach both; parent stays invalid alter index idxpart_expr_idx attach partition idxpart1_expr_idx; alter index idxpart_expr_idx attach partition idxpart2_expr_idx; select relname, indisvalid from pg_class join pg_index on indexrelid = oid where relname like 'idxpart%' order by relname; - relname | indisvalid --------------------+------------ - idxpart1_expr_idx | f - idxpart2_expr_idx | f - idxpart_expr_idx | f -(3 rows) + relname | indisvalid +-------------------------+------------ + idxpart1_expr_idx | f + idxpart1_expr_idx_ccaux | f + idxpart2_expr_idx | f + idxpart2_expr_idx_ccaux | f + idxpart_expr_idx | f +(5 rows) -- fix only idxpart1's index, leave idxpart2's still invalid delete from idxpart1 where b = 0; @@ -638,12 +644,13 @@ alter index idxpart_expr_idx attach partition idxpart1_expr_idx; select relname, indisvalid from pg_class join pg_index on indexrelid = oid where relname like 'idxpart%' order by relname; - relname | indisvalid --------------------+------------ - idxpart1_expr_idx | t - idxpart2_expr_idx | f - idxpart_expr_idx | f -(3 rows) + relname | indisvalid +-------------------------+------------ + idxpart1_expr_idx | t + idxpart2_expr_idx | f + idxpart2_expr_idx_ccaux | f + idxpart_expr_idx | f +(4 rows) drop table idxpart; -- verify dependency handling during ALTER TABLE DETACH PARTITION