diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-10-15 15:16:11 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-10-15 15:16:11 -0300 |
commit | 93f84d59f80d11a3d8ade9ae71560162d6f3ecb2 (patch) | |
tree | 2e55f5e45e6122bb4c672165f1de172ac16a927e /src/backend/access/heap/heapam_visibility.c | |
parent | 85adb5e91ec2f45a388bef7a92a3d988c7e45501 (diff) | |
download | postgresql-93f84d59f80d11a3d8ade9ae71560162d6f3ecb2.tar.gz postgresql-93f84d59f80d11a3d8ade9ae71560162d6f3ecb2.zip |
Revert "Remove pointless HeapTupleHeaderIndicatesMovedPartitions calls"
This reverts commit 85adb5e91ec2. It was not intended for commit just
yet.
Diffstat (limited to 'src/backend/access/heap/heapam_visibility.c')
-rw-r--r-- | src/backend/access/heap/heapam_visibility.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/access/heap/heapam_visibility.c b/src/backend/access/heap/heapam_visibility.c index cab6a48a5da..80bd4940769 100644 --- a/src/backend/access/heap/heapam_visibility.c +++ b/src/backend/access/heap/heapam_visibility.c @@ -607,7 +607,8 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, { if (HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask)) return TM_Ok; - if (!ItemPointerEquals(&htup->t_self, &tuple->t_ctid)) + if (!ItemPointerEquals(&htup->t_self, &tuple->t_ctid) || + HeapTupleHeaderIndicatesMovedPartitions(tuple)) return TM_Updated; /* updated by other */ else return TM_Deleted; /* deleted by other */ @@ -652,7 +653,8 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, if (TransactionIdDidCommit(xmax)) { - if (!ItemPointerEquals(&htup->t_self, &tuple->t_ctid)) + if (!ItemPointerEquals(&htup->t_self, &tuple->t_ctid) || + HeapTupleHeaderIndicatesMovedPartitions(tuple)) return TM_Updated; else return TM_Deleted; @@ -712,7 +714,8 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid, SetHintBits(tuple, buffer, HEAP_XMAX_COMMITTED, HeapTupleHeaderGetRawXmax(tuple)); - if (!ItemPointerEquals(&htup->t_self, &tuple->t_ctid)) + if (!ItemPointerEquals(&htup->t_self, &tuple->t_ctid) || + HeapTupleHeaderIndicatesMovedPartitions(tuple)) return TM_Updated; /* updated by other */ else return TM_Deleted; /* deleted by other */ |