Databases on separate filesystems - Mailing list pgsql-general

From Campano, Troy
Subject Databases on separate filesystems
Date
Msg-id 82C3FD729CFA504CA44E7D32BDED411F0A2EF39A@lm-exmsg-07.lm.lmig.com
Whole thread Raw
List pgsql-general

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

 

 

pgsql-general by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Problems with pgsql mail servers?
Next
From: "Scot L. Harris"
Date:
Subject: How to identify which column in a table is the primary key