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

Commita5ea825

Browse files
committed
Add indisreplident to fields refreshed by RelationReloadIndexInfo()
RelationReloadIndexInfo() is a fast-path used for index reloads in therelation cache, and it has always forgotten about updatingindisreplident, which is something that would happen after an index isselected for a replica identity. This can lead to incorrect cacheinformation provided when executing a command in a transaction contextthat updates indisreplident.None of the code paths currently on HEAD that need to check uponpg_index.indisreplident fetch its value from the relation cache, alwaysrelying on a fresh copy on the syscache. Unfortunately, this may not bethe case of out-of-core code, that could see out-of-date value.Author: Shruthi GowdaReviewed-by: Robert Haas, Dilip Kumar, Michael PaquierDiscussion:https://postgr.es/m/CAASxf_PBcxax0wW-3gErUyftZ0XrCs3Lrpuhq4-Z3Fak1DoW7Q@mail.gmail.comBackpatch-through: 11
1 parent38ea6aa commita5ea825

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/backend/utils/cache/relcache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,6 +2305,7 @@ RelationReloadIndexInfo(Relation relation)
23052305
relation->rd_index->indcheckxmin=index->indcheckxmin;
23062306
relation->rd_index->indisready=index->indisready;
23072307
relation->rd_index->indislive=index->indislive;
2308+
relation->rd_index->indisreplident=index->indisreplident;
23082309

23092310
/* Copy xmin too, as that is needed to make sense of indcheckxmin */
23102311
HeapTupleHeaderSetXmin(relation->rd_indextuple->t_data,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp