Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5A5CA64FCBD for ; Mon, 10 Nov 2008 09:26:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 73298-07 for ; Mon, 10 Nov 2008 09:26:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gmp-eb-inf-2.sun.com (gmp-eb-inf-2.sun.com [192.18.6.24]) by mail.postgresql.org (Postfix) with ESMTP id 7264964FCBC for ; Mon, 10 Nov 2008 09:26:49 -0400 (AST) Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12]) by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id mAADQkfm014999 for ; Mon, 10 Nov 2008 13:26:47 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 <0KA400E01BR58900@fe-emea-10.sun.com> (original mail from Zdenek.Kotala@Sun.COM) for pgsql-hackers@postgresql.org; Mon, 10 Nov 2008 13:26:46 +0000 (GMT) Received: from [192.168.1.101] ([89.102.158.6]) by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0KA400HGUDC2CLI0@fe-emea-10.sun.com>; Mon, 10 Nov 2008 13:26:26 +0000 (GMT) Date: Mon, 10 Nov 2008 14:26:36 +0100 From: Zdenek Kotala Subject: Re: WIP: Page space reservation (pgupgrade) In-reply-to: <29590.1226192897@sss.pgh.pa.us> To: Tom Lane Cc: PostgreSQL-development Message-id: <4918368C.1010003@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <491619D2.2090602@sun.com> <29590.1226192897@sss.pgh.pa.us> User-Agent: Thunderbird 2.0.0.16 (X11/20080922) X-Archive-Number: 200811/686 X-Sequence-Number: 127398 Tom Lane napsal(a): > Zdenek Kotala writes: >> Attached patch allows to setup storage parameter for space >> reservation. > > What is the point of this? We don't need it for 8.3->8.4, we aren't > going to back-patch such a thing into 8.2 or before (certainly not > before, since reloptions didn't exist before 8.2), and I would hope we > put in a more general solution than this for 8.4-to-later preparatory > fixes. There is whole idea. By my opinion the space reservation is possible to split into three separate problems: 1) First mandatory is to implement space reservation functionality in the core. It is what this patch tries to do. It prevents to store new data in reserved area. The configuration is implemented with reloptions. I think This part is possible simply backported back to 8.2 and it allows in-place online upgrade form 8.2 to 8.4 (and indirectly from 8.1). There is only limitation for toasted arrays and composite datatypes, which can be solve with offline conversion. How Jim Nasby mentioned we need to add also per tuple space reservation which is not required for V3->V4 upgrade or it is negative, but it is important to have it for 8.4, because who know what will happen int 8.5 development. By my opinion, this functionality is similar to fillfactor and it is independent. And can be committed separately. 2) Second part is pre-upgrade check/preparation process. For 8.2 it has to be store procedure which will work separately (no core changes). In 8.4 it will be implemented into core - new column in pg_class and pg_database. Vacuum adjusting and so on. 3) Last part is pre-upgrade configuration which correctly setup reserved space all non-system relations in database cluster. Thats my idea. Let me know any comments. Thanks Zdenek