Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9FF076501A9 for ; Mon, 21 Jul 2008 16:22:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 30493-01 for ; Mon, 21 Jul 2008 16:22:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gmp-eb-inf-1.sun.com (gmp-eb-inf-1.sun.com [192.18.6.21]) by postgresql.org (Postfix) with ESMTP id 690D66501A4 for ; Mon, 21 Jul 2008 16:22:26 -0300 (ADT) Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12]) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m6LJMOHl011147 for ; Mon, 21 Jul 2008 19:22:24 GMT Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K4D00F01F43IM00@fe-emea-10.sun.com> (original mail from Zdenek.Kotala@Sun.COM) for pgsql-patches@postgresql.org; Mon, 21 Jul 2008 20:22:24 +0100 (BST) Received: from [192.168.1.101] ([89.103.109.2]) by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K4D00AO9F58UJ10@fe-emea-10.sun.com>; Mon, 21 Jul 2008 20:22:21 +0100 (BST) Date: Mon, 21 Jul 2008 21:19:25 +0200 From: Zdenek Kotala Subject: Re: page macros cleanup (ver 04) In-reply-to: <13370.1215975739@sss.pgh.pa.us> To: Tom Lane Cc: Heikki Linnakangas , Pavan Deolasee , PostgreSQL-patches Message-id: <4884E13D.3070109@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-2 Content-transfer-encoding: 7BIT 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> <13370.1215975739@sss.pgh.pa.us> User-Agent: Thunderbird 2.0.0.14 (X11/20080630) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/211 X-Sequence-Number: 6905 Tom Lane napsal(a): > "Heikki Linnakangas" 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.) :-) Yeah, These changes break in-place-upgrade on hash indexes and invokes reindexing request. I have had several reasons why I didn't complaint about it: 1) IIRC, hash function for double has been change 2) there is ongoing project to improve hash index performance -> completely redesigned content 3) hash index is not much used (by my opinion) and it affect only small group of users > 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. Thanks for applying patch. I think that hash index "upgradebility" is currently broken or it will be with new hash index improvement. But if I think about it it does not make sense to break compatibility by this patch first. I will prepare patch which will be upgrade friendly. And if we will reimplement hash index soon, than we can clean a code. > 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? I think it is OK and I seen that you already applied a patch. Thanks Zdenek -- Zdenek Kotala Sun Microsystems Prague, Czech Republic http://sun.com/postgresql