Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2C00B1337B2F for ; Mon, 15 Nov 2010 16:58:40 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 68533-04 for ; Mon, 15 Nov 2010 20:58:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id B05761335B36 for ; Mon, 15 Nov 2010 16:58:32 -0400 (AST) Received: from [192.168.10.2] (ASte-Genev-Bois-153-1-80-230.w86-203.abo.wanadoo.fr [86.203.226.230]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id 733213B8F5; Mon, 15 Nov 2010 21:58:32 +0100 (CET) Message-ID: <4CE19EF7.2090407@lelarge.info> Date: Mon, 15 Nov 2010 21:58:31 +0100 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Chris Ruprecht CC: pgsql-admin@postgresql.org Subject: Re: Pre-Allocate tablespace on disk References: <9CB65F11-6FA4-48D5-BCC5-B3F694659965@ruprecht.org> In-Reply-To: <9CB65F11-6FA4-48D5-BCC5-B3F694659965@ruprecht.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/126 X-Sequence-Number: 36092 Le 15/11/2010 20:42, Chris Ruprecht a écrit : > Hello, > > I was wondering if there is a way to pre-allocate tablespace on disk before adding data and indexes. > My understanding is: > PG writes data into files sequentially. If more space is needed, disk space is requested from the OS and if there is space, the OS will give PG a file system block and PG will write data/indexes until that block is full and so on. > Other database that I have worked with before and that I'm still working with, allow you to pre-allocate disk space so you get huge chunks of contiguous space at one, which has major impacts on database performance. > > Can this be done with PG at all? No. A tablespace is a directory on PostgreSQL. And you can't allocate space for a directory. > If not, is this planned for any time in the future? AFAICT, nope. -- Guillaume http://www.postgresql.fr http://dalibo.com