From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Remove pointless HeapTupleHeaderIndicatesMovedPartitions calls |
Date: | 2021-02-22 21:39:29 |
Message-ID: | E1lEIvR-00049Q-GK@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Remove pointless HeapTupleHeaderIndicatesMovedPartitions calls
Pavan Deolasee recently noted that a few of the
HeapTupleHeaderIndicatesMovedPartitions calls added by commit
5db6df0c0117 are useless, since they are done after comparing t_self
with t_ctid. But because t_self can never be set to the magical values
that indicate that the tuple moved partition, this can never succeed: if
the first test fails (so we know t_self equals t_ctid), necessarily the
second test will also fail.
So these checks can be removed and no harm is done. There's no bug
here, just a code legibility issue.
Reported-by: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Discussion: https://postgr.es/m/20200929164411.GA15497@alvherre.pgsql
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0f5505a8815aa4eb03ca61245a5a51ff9adda2f4
Modified Files
--------------
src/backend/access/heap/heapam.c | 12 ++++--------
src/backend/access/heap/heapam_visibility.c | 9 +++------
2 files changed, 7 insertions(+), 14 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2021-02-23 03:49:38 | pgsql: Change the error message for logical replication authentication |
Previous Message | Alvaro Herrera | 2021-02-22 14:42:08 | pgsql: Fix typo |