Thread: Please, help! About database cluster and adding to it additional disk space

Please, help! About database cluster and adding to it additional disk space

From
Sergey Karin
Date:
Hi, List!

Lets suppose the next situation...

We create database cluster (via initdb) on some disk. Then we create and use a database that can be very large. In some moment the database occupy all disk space allicated to cluster.
The question is: are there any abilities in PostgreSQL to use for created cluster additional disk space in new other disk? Similar ability exist in Informix...

Thanks in advance for any answers!

Sergey Karin

Re: Please, help! About database cluster and adding to it additional disk space

From
Martijn van Oosterhout
Date:
On Wed, Jan 25, 2006 at 12:40:36PM +0300, Sergey Karin wrote:
> Hi, List!
>
> Lets suppose the next situation...
>
> We create database cluster (via initdb) on some disk. Then we create and use
> a database that can be very large. In some moment the database occupy all
> disk space allicated to cluster.
> The question is: are there any abilities in PostgreSQL to use for created
> cluster additional disk space in new other disk? Similar ability exist in
> Informix...

You didn't say which version you are running, but recent versions have
tablespaces which do what you want. Alternativly, if you're running LVM
somewhere, you could make the disk postgres is no bigger...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

Re: Please, help! About database cluster and adding to

From
Richard Huxton
Date:
Sergey Karin wrote:
> Hi, List!
>
> Lets suppose the next situation...
>
> We create database cluster (via initdb) on some disk. Then we create and use
> a database that can be very large. In some moment the database occupy all
> disk space allicated to cluster.
> The question is: are there any abilities in PostgreSQL to use for created
> cluster additional disk space in new other disk? Similar ability exist in
> Informix...

Well, there are various filesystem add-ons that allow you to have
virtual partitions spread over one or more physical disks. I'm guessing
you're not using any of those.

You can move the WAL to a different disk and use table-spaces to
relocate tables and indexes. See the manuals for tablespace setup and
check the mailing-list archives for how to do it the hard way with
symbolic links if you're running an old version of PG.

--
   Richard Huxton
   Archonet Ltd

Re: Please, help! About database cluster and adding to

From
Devrim GUNDUZ
Date:
Hi,

On Wed, 2006-01-25 at 12:40 +0300, Sergey Karin wrote:
> We create database cluster (via initdb) on some disk. Then we create
> and use a database that can be very large. In some moment the database
> occupy all disk space allicated to cluster.
> The question is: are there any abilities in PostgreSQL to use for
> created cluster additional disk space in new other disk? Similar
> ability exist in Informix...

You should either use LVM or tablespaces for this.

Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/