From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Remove direct uses of ItemPointer.{ip_blkid,ip_posid}
Date: Tue, 28 Mar 2017 22:05:04 +0000
Message-ID: <E1cszEe-0000hQ-NM@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Remove direct uses of ItemPointer.{ip_blkid,ip_posid}
There are no functional changes here; this simply encapsulates knowledge
of the ItemPointerData struct so that a future patch can change things
without more breakage.
All direct users of ip_blkid and ip_posid are changed to use existing
macros ItemPointerGetBlockNumber and ItemPointerGetOffsetNumber
respectively. For callers where that's inappropriate (because they
Assert that the itempointer is is valid-looking), add
ItemPointerGetBlockNumberNoCheck and ItemPointerGetOffsetNumberNoCheck,
which lack the assertion but are otherwise identical.
Author: Pavan Deolasee
Discussion: https://postgr.es/m/CABOikdNnFon4cJiL=h1mZH3bgUeU+sWHuU4Yr8AB=j3A2p1GiA@mail.gmail.com
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/ce96ce60ca2293f75f36c3661e4657a3c79ffd61
Modified Files
--------------
contrib/pageinspect/btreefuncs.c | 4 ++--
contrib/pgstattuple/pgstattuple.c | 2 +-
src/backend/access/gin/ginget.c | 29 +++++++++++++++----------
src/backend/access/gin/ginpostinglist.c | 14 +++++-------
src/backend/replication/logical/reorderbuffer.c | 4 ++--
src/backend/storage/page/itemptr.c | 15 +++++++------
src/backend/utils/adt/tid.c | 17 +++++----------
src/include/access/gin_private.h | 6 ++---
src/include/access/ginblock.h | 11 ++++++++--
src/include/access/htup_details.h | 2 +-
src/include/access/nbtree.h | 5 ++---
src/include/storage/itemptr.h | 26 ++++++++++++++++++----
12 files changed, 78 insertions(+), 57 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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 direct uses of ItemPointer.{ip_blkid,ip_posid}
In-Reply-To: <E1cszEe-0000hQ-NM@gemulon.postgresql.org>
References: <E1cszEe-0000hQ-NM@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