Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B744C650030 for ; Thu, 4 Sep 2008 18:16:05 -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 45698-08 for ; Thu, 4 Sep 2008 18:16:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by postgresql.org (Postfix) with ESMTP id EF59164FCEF for ; Thu, 4 Sep 2008 18:16:01 -0300 (ADT) Received: by ey-out-2122.google.com with SMTP id 6so54445eyi.61 for ; Thu, 04 Sep 2008 14:15:58 -0700 (PDT) Received: by 10.210.91.17 with SMTP id o17mr12483576ebb.172.1220562958223; Thu, 04 Sep 2008 14:15:58 -0700 (PDT) Received: from ?80.222.42.69? ( [80.222.42.69]) by mx.google.com with ESMTPS id 1sm9199652nfv.18.2008.09.04.14.15.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Sep 2008 14:15:57 -0700 (PDT) Message-ID: <48C0500A.8020301@enterprisedb.com> Date: Fri, 05 Sep 2008 00:15:54 +0300 Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: Zdenek Kotala CC: PostgreSQL-development Subject: Re: Prototype: In-place upgrade References: <48BB10A2.60503@sun.com> In-Reply-To: <48BB10A2.60503@sun.com> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit From: Heikki Linnakangas X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/277 X-Sequence-Number: 123406 The patch seems to be missing the new htup.c file. Zdenek Kotala wrote: > Attached patch is prototype of in-place upgrade as was presented on > PGCon this year. > > Main idea is to learn postgres to handle different version of page and > tuple structures. > > 1) page - Patch contains new page API and all code access page through > this API. Functions check page version and return correct data to > caller. It is mostly complete now. Only ItemId flags need finish. > > 2) tuple - HeapTuple structure has been extended with t_ver attribute > which contains page layout version and direct access to HeapTupleHeader > is forbidden. It is possible now only through HeapTuple* functions (see > htup.c). (HeapTupleHeader access still stays in a several functions like > heap_form_tuple). > > This patch version still does not allow to read old database, but it > shows how it should work. Main disadvantage of this approach is > performance penalty. > > Please, let me know your opinion about this approach. > > Future work: > 1) learn WAL to process different tuple structure version > 2) tuple conversion to new version and put it into executor > (ExecStoreTuple) > 3) multiversion MaxItemSize constant -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com