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

Commit3326678

Browse files
danolivoarssher
authored andcommitted
[PGPRO-4074] Skip equality check of dropped column during apply process.
Replication worker don't send dropped attribute (attisdropped == true) to areplica. But in the heap it may be not null. If we apply UPDATE operation in theREPLICA IDENTITY FULL mode, we will do SeqScan on the table and check equalityof each attribute of each tuple. Tuple in the heap will have value ofattr->isnull == false, tuple that passed from another node - true.(cherry picked from commit 8d4c732f0e653ae6c65b4764f7de4f31456284ff)tags: multimaster(cherry picked from commit 2825fa678e82ba0fd6888bacc95f2b112401a46c)
1 parent9ed770f commit3326678

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/backend/executor/execReplication.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,15 @@ tuples_equal(TupleTableSlot *slot1, TupleTableSlot *slot2,
244244
Form_pg_attributeatt;
245245
TypeCacheEntry*typentry;
246246

247+
/* The case of ALTER TABLE ... DROP COLUMN */
248+
if (TupleDescAttr(slot1->tts_tupleDescriptor,attrnum)->attisdropped||
249+
TupleDescAttr(slot1->tts_tupleDescriptor,attrnum)->attgenerated)
250+
{
251+
Assert(slot1->tts_tupleDescriptor->attrs[attrnum].attisdropped==
252+
slot2->tts_tupleDescriptor->attrs[attrnum].attisdropped);
253+
continue;
254+
}
255+
247256
/*
248257
* If one value is NULL and other is not, then they are certainly not
249258
* equal

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp