Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id E4F8A1337B55 for ; Fri, 26 Nov 2010 16:39:38 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 70806-06 for ; Fri, 26 Nov 2010 20:39:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from acidenitrix.villemain.org (acidenitrix.villemain.org [91.121.90.165]) by mail.postgresql.org (Postfix) with ESMTP id 379DF133798E for ; Fri, 26 Nov 2010 16:39:31 -0400 (AST) Received: from 89-158-241-48.rev.dartybox.com ([89.158.241.48] helo=DimIMac.local) by acidenitrix.villemain.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PM54r-0004mW-N9; Fri, 26 Nov 2010 21:39:29 +0100 Received: by DimIMac.local (Postfix, from userid 501) id 13DF3128F8B2; Fri, 26 Nov 2010 21:39:24 +0100 (CET) From: Dimitri Fontaine To: Chris Ruprecht Cc: pgsql-admin@postgresql.org Subject: Re: Pre-Allocate tablespace on disk Organization: 2ndQuadrant References: <9CB65F11-6FA4-48D5-BCC5-B3F694659965@ruprecht.org> User-Mail-Address: dimitri@2ndQuadrant.fr Date: Fri, 26 Nov 2010 21:39:24 +0100 In-Reply-To: <9CB65F11-6FA4-48D5-BCC5-B3F694659965@ruprecht.org> (Chris Ruprecht's message of "Mon, 15 Nov 2010 14:42:46 -0500") Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201011/230 X-Sequence-Number: 36196 Chris Ruprecht writes: > I was wondering if there is a way to pre-allocate tablespace on disk > before adding data and indexes. As others have already said, it's not clear there's a point in doing that with PostgreSQL. Now, you can achieve it and see for yourself by relying on OS tools, such as LVM of ZFS, or some other tricks. For example, create a big enough file, loop mount it as a device, and create your tablespace in there. Of course what to do exactly when the file is full is left as an exercise to the reader. Bonus points for any solution not involving downtime. Baseline: it seems that PostgreSQL works differently enough from your usual software than you may want to reconsider your habits=C2=A0:) Regards, --=20 Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support