Thread: Postgres and more than 2 Locations for storage

Postgres and more than 2 Locations for storage

From
"Brian C. Doyle"
Date:
Hello all,

I am trying to setup Postgresql to run in more that 2 locations.

Setting PGDATA and PGDATA2 work fine with out a problem but I would like to
setup more that those 2 locations ie PGDATA3(4,5,ect) and can not seem to
find if this is possible or not.

I know that i need to initdb the location if i want to run a separate
server on a separate port or just initlocation for the same (atleast I
think i understand that) and have tried both for PGDATA3 and i get error
pertaining to "ERROR:  Postmaster environment variable 'PGDATA3' not set"

What can I change to make this work?

Thank you all for your help


Re: Postgres and more than 2 Locations for storage

From
Thomas Lockhart
Date:
> Setting PGDATA and PGDATA2 work fine with out a problem but I would like to
> setup more that those 2 locations ie PGDATA3(4,5,ect) and can not seem to
> find if this is possible or not.

Certainly it is possible. Follow the directions in the admin docs (use
createlocation etc) and make sure that any new environment variables are
set just like PGDATA2 is already set (maybe in the postgres account's
.bashrc/.cshrc/?? script?).

                    - Thomas