Databases on separate filesystems

Поиск
Список
Период
Сортировка
От Campano, Troy
Тема Databases on separate filesystems
Дата
Msg-id 82C3FD729CFA504CA44E7D32BDED411F0A2EF488@lm-exmsg-07.lm.lmig.com
обсуждение исходный текст
Список 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

 

 

В списке pgsql-admin по дате отправления:

Предыдущее
От: "David Parker"
Дата:
Сообщение: Re: Error running initdb
Следующее
От: Jodi Kanter
Дата:
Сообщение: rename