Re: How to run more the one database at once ?

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: How to run more the one database at once ?
Дата
Msg-id Pine.LNX.4.33.0305161258560.4710-100000@css120.ihs.com
обсуждение исходный текст
Ответ на How to run more the one database at once ?  (Michelle Konzack <linux4michelle@freenet.de>)
Список pgsql-general
On Wed, 23 Apr 2003, Michelle Konzack wrote:

> Hello,
>
> I need to run 8 seperately databases at the same time and independant.
> I have for each database a partition so no database can kill the other.
>
> I am using Debian GNU/Linux 3.0 with Kernel 2.4.19

There are two ways to do this.

You can use a single cluster with multiple data stores, or you can run
multiple clusters.

To do this with one cluster on multiple stores, do something like this:

Put this in your .bash_profile for the postgres superuser:

export PGDATA1 = /mnt/raid1/d1
export PGDATA2 = /mnt/raid1/d2
export PGDATA3 = /mnt/raid1/d3
export PGDATA4 = /mnt/raid1/d4
export PGDATA5 = /mnt/raid1/d5
export PGDATA6 = /mnt/raid1/d6
export PGDATA7 = /mnt/raid1/d7
export PGDATA8 = /mnt/raid1/d8

Then, su - to the postgres superuser to set those, or just run the
.bash_profile script by hand...

After that, you can issue these commands:

initlocation $PGDATA1
initlocation $PGDATA2
initlocation $PGDATA3
initlocation $PGDATA4
initlocation $PGDATA5
initlocation $PGDATA6
initlocation $PGDATA7
initlocation $PGDATA8

createdb -D PGDATA1 dbname1
createdb -D PGDATA2 dbname2
createdb -D PGDATA3 dbname3
createdb -D PGDATA4 dbname4
createdb -D PGDATA5 dbname5
createdb -D PGDATA6 dbname6
createdb -D PGDATA7 dbname7
createdb -D PGDATA8 dbname8

and then you've got 8 databases on 8 different drives under one
postmaster, all answering on port 5432 if you turn on tcp sockets.

If you want seperate postmasters, you'll do best setting up individual
accounts for each postmaster, and having them each answer on a differnet
port.



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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: Datatype Definition
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: MSSQL -> PostgreSQL