pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Cc: Pavan Deolasee <pavan.deolasee@gmail.com>
Cc: PostgreSQL-patches <pgsql-patches@postgresql.org>
Subject: Re: page macros cleanup (ver 04)
Date: Sun, 13 Jul 2008 15:02:19 -0400
Message-ID: <13370.1215975739@sss.pgh.pa.us> (raw)
In-Reply-To: <4874A6E0.9070909@enterprisedb.com>
References: <48529B83.9010907@sun.com>
	<2e78013d0807030450m4cab60d0jd99d1acce59fae56@mail.gmail.com>
	<486DD1D1.50604@sun.com>
	<2e78013d0807040150w393ad72codaf06a6ac12a83ce@mail.gmail.com>
	<486DF644.4070604@enterprisedb.com>
	<2e78013d0807040350m3b2913cfkceaa70d8f9d697c2@mail.gmail.com>
	<486E01B0.9050100@enterprisedb.com>
	<2e78013d0807040404q5ff7f7faq9f87a39e0f0552fa@mail.gmail.com>
	<486E138F.4060900@sun.com>
	<4874A6E0.9070909@enterprisedb.com>

"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> ...  That macro is actually doing the 
> same thing as PageGetContents, so I switched to using that. As that 
> moves the data sligthly on those bitmap pages, I guess we'll need a 
> catversion bump.

I'm amazed that Zdenek didn't scream bloody murder about that.  You're
creating a work item for in-place-upgrade that would not otherwise
exist, in exchange for a completely trivial bit of code beautification.
(The same can be said of his proposed change to hash meta pages.)

I'm planning to go over this patch today and apply it sans the parts
that would require catversion bump.  We can argue later about whether
those are really worth doing, but I'm leaning to "not" --- unless Zdenek
says that he has no intention of making in-place-upgrade handle hash
indexes any time soon.

BTW, after further thought about the PageGetContents() situation:
right now we can change it to guarantee maxalignment "for free",
since SizeOfPageHeaderData happens to be maxaligned on all platforms
(this wasn't the case as recently as 8.2).  So I'm thinking we should
do that.  There's at least one place that thinks that PageGetContents
is the same as page + SizeOfPageHeaderData, but that's easily fixed.
On balance it seems like hidden assumptions about alignment are a bigger
risk than assumptions about that offset --- anyone want to argue the
contrary?

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <13370.1215975739@sss.pgh.pa.us>
Permalink:  ../13370.1215975739@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13370.1215975739@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: tgl@sss.pgh.pa.us, heikki@enterprisedb.com, Zdenek.Kotala@Sun.COM, pavan.deolasee@gmail.com
  Subject: Re: page macros cleanup (ver 04)
  In-Reply-To: <13370.1215975739@sss.pgh.pa.us>

* 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