Re: some pointless HeapTupleHeaderIndicatesMovedPartitions calls

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org, Álvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2021-02-20T12:58:04Z
Lists: pgsql-hackers
On Sat, Feb 13, 2021 at 10:49:26AM +0900, Michael Paquier wrote:
> So that's this patch: https://commitfest.postgresql.org/32/2941/.
> Alvaro is most likely going to take care of that, so let's wait for
> him.

Hearing nothing, I have looked at this stuff and the simplification
makes sense.  Any comments?

I can see that ItemPointerSetMovedPartitions() in itemptr.h is not
used in the code.  Could it be better to change the comment in
htup_details.h to mention HeapTupleHeaderSetMovedPartitions instead?
Perhaps not worth bothering, just noticed this on the way.
--
Michael

Commits

  1. Rework HeapTupleHeader macros to reuse itemptr.h

  2. Remove pointless HeapTupleHeaderIndicatesMovedPartitions calls

  3. tableam: Add tuple_{insert, delete, update, lock} and use.