Databases on separate filesystems

From: "Campano, Troy" <Troy(dot)Campano(at)LibertyMutual(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Databases on separate filesystems
Date: 2004-06-02 12:18:59
Message-ID: 82C3FD729CFA504CA44E7D32BDED411F0A2EF488@lm-exmsg-07.lm.lmig.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I need to have each one of my PostgreSQL databases put on a separate
filesystem.

I wanted to do the following...can someone verify that this will work?

1) Create the following environment variables:
a. export PGDATA01=/filesystem1
b. export PGDATA02=/filesystem2
c. export PGDATA03=/filesystem3

2) Run the following commands at UNIX prompt:
a. initlocation /filesystem1
b. initlocation /filesystem2
c. initlocation /filesystem3

3) Restart my postgresql server (to pick up the new environment
variables)

4) Then when I create databases I would do this:
a. CREATE DATABASE mydb01 WITH LOCATION = 'PGDATA01';
b. CREATE DATABASE mydb02 WITH LOCATION = 'PGDATA02';
c. CREATE DATABASE mydb02 WITH LOCATION = 'PGDATA03';

Is this correct to get databases created on separate filesystems?

Thank you!

Troy Campano

Browse pgsql-admin by date

  From Date Subject
Next Message Frank Smith 2004-06-02 15:09:14 Re: Performance Problem
Previous Message W. Scott Gibson 2004-06-02 04:36:19 Re: Postgresql lib and include files for SuSE 9.0 RPMS?