Re: Pre-Allocate tablespace on disk

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Chris Ruprecht <chris(at)ruprecht(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Pre-Allocate tablespace on disk
Date: 2010-11-26 20:39:24
Message-ID: m2hbf3n7k3.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Chris Ruprecht <chris(at)ruprecht(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Hamza Bin Sohail 2010-11-27 00:41:02 large page query
Previous Message Martin Gainty 2010-11-26 18:23:10 Re: plpyhton