Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 01A587986F2 for ; Tue, 16 Mar 2010 21:43:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 58126-03-8 for ; Wed, 17 Mar 2010 00:43:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id B4075798701 for ; Tue, 16 Mar 2010 21:14:09 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id C0B8034803D; Tue, 16 Mar 2010 17:14:07 -0700 (PDT) Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YaiXQwAkCEgI; Tue, 16 Mar 2010 17:14:07 -0700 (PDT) Received: from perhan.alvh.no-ip.org (200-85-214-83.bk4-dsl.surnet.cl [200.85.214.83]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 64C2934803A; Tue, 16 Mar 2010 17:14:07 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 39F636E4BD; Tue, 16 Mar 2010 21:14:05 -0300 (CLST) Date: Tue, 16 Mar 2010 21:14:05 -0300 From: Alvaro Herrera To: Dave Crooke Cc: Tom Lane , Greg Stark , Pierre C , Greg Smith , Paul McGarry , pgsql-performance@postgresql.org Subject: Re: Block at a time ... Message-ID: <20100317001405.GL3037@alvh.no-ip.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.559 tagged_above=-10 required=5 tests=AWL=0.040, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/186 X-Sequence-Number: 38011 Dave Crooke escribió: > An awesomely simple alternative is to just specify the extension as e.g. 5% > of the existing table size .... it starts by adding one block at a time for > tiny tables, and once your table is over 20GB, it ends up adding a whole 1GB > file and pre-allocating it. Very little wasteage. I was thinking in something like that, except that the factor I'd use would be something like 50% or 100% of current size, capped at (say) 1 GB. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support