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

Commit3beb945

Browse files
author
Amit Kapila
committed
Improve assertion in FindReplTupleInLocalRel().
The first part of the assertion verifying that the passed index must be PKor RI was incorrectly passing index relation instead of heap relation inGetRelationIdentityOrPK(). The assertion was not failing because thesecond part of the assertion which needs to be performed only when remoterelation has REPLICA_IDENTITY_FULL set was also incorrect.The change is not backpatched because the current coding doesn't lead toany failure.Reported-by: Dilip KumarAuthor: Amit KapilaReviewed-by: Vignesh CDiscussion:https://postgr.es/m/CAFiTN-tmguaT1DXbCC+ZomZg-oZLmU6BPhr0po7akQSG6vNJrg@mail.gmail.com
1 parent65c310b commit3beb945

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/backend/replication/logical/worker.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2929,9 +2929,10 @@ FindReplTupleInLocalRel(ApplyExecutionData *edata, Relation localrel,
29292929
Relationidxrel=index_open(localidxoid,AccessShareLock);
29302930

29312931
/* Index must be PK, RI, or usable for REPLICA IDENTITY FULL tables */
2932-
Assert(GetRelationIdentityOrPK(idxrel)==localidxoid||
2933-
IsIndexUsableForReplicaIdentityFull(BuildIndexInfo(idxrel),
2934-
edata->targetRel->attrmap));
2932+
Assert(GetRelationIdentityOrPK(localrel)==localidxoid||
2933+
(remoterel->replident==REPLICA_IDENTITY_FULL&&
2934+
IsIndexUsableForReplicaIdentityFull(BuildIndexInfo(idxrel),
2935+
edata->targetRel->attrmap)));
29352936
index_close(idxrel,AccessShareLock);
29362937
#endif
29372938

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp