pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Chris Ruprecht <chris@ruprecht.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: Pre-Allocate tablespace on disk
Date: Mon, 15 Nov 2010 21:58:31 +0100
Message-ID: <4CE19EF7.2090407@lelarge.info> (raw)
In-Reply-To: <9CB65F11-6FA4-48D5-BCC5-B3F694659965@ruprecht.org>
References: <9CB65F11-6FA4-48D5-BCC5-B3F694659965@ruprecht.org>

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



view thread (6+ messages)  latest in thread

Message-ID: <4CE19EF7.2090407@lelarge.info>
Permalink:  ../4CE19EF7.2090407@lelarge.info/
Also on:    postgresql.org/message-id/4CE19EF7.2090407@lelarge.info

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: guillaume@lelarge.info, chris@ruprecht.org
  Subject: Re: Pre-Allocate tablespace on disk
  In-Reply-To: <4CE19EF7.2090407@lelarge.info>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox