From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove pointless HeapTupleHeaderIndicatesMovedPartitions calls
Date: Mon, 22 Feb 2021 21:39:29 +0000
Message-ID: <E1lEIvR-00049Q-GK@gemulon.postgresql.org> (raw)
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.deolasee@gmail.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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Remove pointless HeapTupleHeaderIndicatesMovedPartitions calls
In-Reply-To: <E1lEIvR-00049Q-GK@gemulon.postgresql.org>
References: <E1lEIvR-00049Q-GK@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox