pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
To: Chris Ruprecht <chris@ruprecht.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: Pre-Allocate tablespace on disk
Date: Fri, 26 Nov 2010 21:39:24 +0100
Message-ID: <m2hbf3n7k3.fsf@2ndQuadrant.fr> (raw)
In-Reply-To: <9CB65F11-6FA4-48D5-BCC5-B3F694659965@ruprecht.org>
References: <9CB65F11-6FA4-48D5-BCC5-B3F694659965@ruprecht.org>

Chris Ruprecht <chris@ruprecht.org> 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Ā :)

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



view thread (6+ messages)

Message-ID: <m2hbf3n7k3.fsf@2ndQuadrant.fr>
Permalink:  ../m2hbf3n7k3.fsf@2ndQuadrant.fr/
Also on:    postgresql.org/message-id/m2hbf3n7k3.fsf@2ndQuadrant.fr

 · 

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: dimitri@2ndQuadrant.fr, chris@ruprecht.org
  Subject: Re: Pre-Allocate tablespace on disk
  In-Reply-To: <m2hbf3n7k3.fsf@2ndQuadrant.fr>

* 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