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

Commit11d0677

Browse files
knizhnikkelvich
authored andcommitted
Fix bug in handling tables without primary key
1 parentd4bcc33 commit11d0677

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

‎multimaster.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,15 +2395,18 @@ MtmExecutorFinish(QueryDesc *queryDesc)
23952395
for (i=0;i<estate->es_num_result_relations;i++) {
23962396
Relationrel=estate->es_result_relations[i].ri_RelationDesc;
23972397
if (RelationNeedsWAL(rel)) {
2398+
if (MtmIgnoreTablesWithoutPk) {
2399+
if (!rel->rd_indexvalid) {
2400+
RelationGetIndexList(rel);
2401+
}
2402+
if (rel->rd_replidindex==InvalidOid) {
2403+
MtmMakeRelationLocal(RelationGetRelid(rel));
2404+
continue;
2405+
}
2406+
}
23982407
MtmTx.containsDML= true;
23992408
break;
24002409
}
2401-
if (MtmIgnoreTablesWithoutPk) {
2402-
if (!rel->rd_indexvalid) {
2403-
RelationGetIndexList(rel);
2404-
}
2405-
MtmMakeRelationLocal(rel->rd_replidindex);
2406-
}
24072410
}
24082411
}
24092412
if (MtmTx.isDistributed&&MtmTx.containsDML&& !IsTransactionBlock()) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp