pgsql: Move BRIN page type to page's last two bytes

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Move BRIN page type to page's last two bytes
Date: 2015-03-10 15:37:23
Message-ID: E1YVMDj-0005uJ-Ln@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Move BRIN page type to page's last two bytes

... which is the usual convention among AMs, so that pg_filedump and
similar utilities can tell apart pages of different AMs. It was also
the intent of the original code, but I failed to realize that alignment
considerations would move the whole thing to the previous-to-last word
in the page.

The new definition of the associated macro makes surrounding code a bit
leaner, too.

Per note from Heikki at
http://www.postgresql.org/message-id/546A16EF.9070005@vmware.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e491bd2ee34860b14ff18abc5602f9aa5b197a2d

Modified Files
--------------
contrib/pageinspect/brinfuncs.c | 13 ++++-------
src/backend/access/brin/brin_pageops.c | 23 +++++--------------
src/backend/access/brin/brin_revmap.c | 2 +-
src/include/access/brin_page.h | 38 ++++++++++++++++++++++++--------
src/include/access/gin_private.h | 8 +++----
src/include/access/spgist_private.h | 2 ++
6 files changed, 45 insertions(+), 41 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-03-10 15:48:45 pgsql: Clean up the mess from => patch.
Previous Message Robert Haas 2015-03-10 15:12:38 pgsql: Allow named parameters to be specified using => in addition to :