Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitedb0f6e

Browse files
committed
Fix waits of REINDEX CONCURRENTLY for indexes with predicates or expressions
As introduced byf9900df, a REINDEX CONCURRENTLY job done for anindex with predicates or expressions would set PROC_IN_SAFE_IC in itsMyProc->statusFlags, causing it to be ignored by other concurrentoperations.Such concurrent index rebuilds should never be ignored, as a predicateor an expression could call a user-defined function that accesses adifferent table than the table where the index is rebuilt.A test that uses injection points is added, backpatched down to 17.Michail has proposed a different test, but I have added somethingsimpler with more coverage.Oversight inf9900df.Author: Michail NikolaevDiscussion:https://postgr.es/m/CANtu0oj9A3kZVduFTG0vrmGnKB+DCHgEpzOp0qAyOgmks84j0w@mail.gmail.comBackpatch-through: 14
1 parentdd20f95 commitedb0f6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/commands/indexcmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3739,8 +3739,8 @@ ReindexRelationConcurrently(Oid relationOid, ReindexParams *params)
37393739
save_nestlevel=NewGUCNestLevel();
37403740

37413741
/* determine safety of this index for set_indexsafe_procflags */
3742-
idx->safe= (indexRel->rd_indexprs==NIL&&
3743-
indexRel->rd_indpred==NIL);
3742+
idx->safe= (RelationGetIndexExpressions(indexRel)==NIL&&
3743+
RelationGetIndexPredicate(indexRel)==NIL);
37443744
idx->tableId=RelationGetRelid(heapRel);
37453745
idx->amId=indexRel->rd_rel->relam;
37463746

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp