Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0EE86650E1E for ; Fri, 4 Jul 2008 00:24:37 -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 70462-08 for ; Fri, 4 Jul 2008 00:24:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp3.clear.net.nz (smtp3.clear.net.nz [203.97.33.64]) by postgresql.org (Postfix) with ESMTP id BF1D164FD64 for ; Fri, 4 Jul 2008 00:24:16 -0300 (ADT) Received: from zmori.markir.net (121-73-160-103.dsl.telstraclear.net [121.73.160.103]) by smtp3.clear.net.nz (CLEAR Net Mail) with ESMTP id <0K3G0040CPGDA300@smtp3.clear.net.nz> for pgsql-patches@postgresql.org; Fri, 04 Jul 2008 15:24:15 +1200 (NZST) Date: Fri, 04 Jul 2008 15:23:51 +1200 From: Mark Kirkwood Subject: Re: Relation forks & FSM rewrite patches In-reply-to: <48651722.8020600@enterprisedb.com> To: Heikki Linnakangas Cc: pgsql-patches Message-id: <486D97C7.2070204@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: <48651722.8020600@enterprisedb.com> User-Agent: Thunderbird 2.0.0.14 (X11/20080601) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/39 X-Sequence-Number: 6734 Heikki Linnakangas wrote: > Here's an updated version of the "relation forks" patch, and an > incremental FSM rewrite patch on top of that. The relation forks patch > is ready for review. The FSM implementation is more work-in-progress > still, but I'd like to get some review on that as well, with the goal > of doing more performance testing and committing it after the commit > fest. > > The one part that I'm not totally satisfied in the relation forks > patch is the smgrcreate() function. The question problem is: which > piece of code decides which forks to create for a relation, and when > to create them? I settled on the concept that all forks that a > relation will need are created at once, in one smgrcreate() call. > There's no function to create additional forks later on. Likewise, > there's no function to unlink individual forks, you have to unlink the > whole relation. > > Currently, heap_create() decides which forks to create. That's fine at > the moment, but will become problematic in the future, as it's > indexam-specific which forks an index requires. That decision should > really be done in the indexam. One possibility would be to only create > the main fork in heap_create(), and let indexam create any additional > forks it needs in ambuild function. > I've had a bit of a play with this, looks pretty nice. One point that comes to mind is that we are increasing the number of required file descriptors by a factor of 2 (and possibly 3 if we use a fork for the visibility map). Is this a problem do you think? Cheers Mark