Re: Multiple postgresql clusters with same version and separate binaries

Поиск
Список
Период
Сортировка
От MichaelDBA
Тема Re: Multiple postgresql clusters with same version and separate binaries
Дата
Msg-id 5C2F82EA.5070601@sqlexec.com
обсуждение исходный текст
Ответ на Re: Multiple postgresql clusters with same version and separatebinaries  (Rui DeSousa <rui@crazybean.net>)
Список pgsql-admin
I did say you need to run with different binaries for different versions:

To put it simply: you cannot run different major versions of PostgreSQL with the same binaries.


So when I subsequently said the following it was in that context.

The 3rd one is separate binary locations for each PG cluster instance running on the same host.

Friday, January 4, 2019 10:53 AM



Don’t need separate binaries for each cluster; only separate binaries for each version needed; i.e. 9.6.1, 9.6.2, etc.

Friday, January 4, 2019 9:32 AM
To put it simply: you cannot run different major versions of PostgreSQL with the same binaries. 3 things need to be separate.  You named 2 of them: data directory and port.  The 3rd one is separate binary locations for each PG cluster instance running on the same host.

What I do is create a separate .profile_pgsql file for each PG cluster instance.  This file contains all the stuff necessary to distinguish between multiple PG clusters.  Here is an example for a specific Linux distro...

export VERSION=9.6
export PGROOT=/usr/pgsql-$VERSION
export PGBASE=/var/lib/pgsql/$VERSION
export PATH=$PGROOT/bin:$PGROOT/share:$PATH
export PGLIB=$PGROOT/lib
export MANPATH=$PGROOT/share/man:$MANPATH
export LD_LIBRARY_PATH=$PGROOT/bin:$PGBASE/share:$PATH
export PGDATA=$PGBASE/data
export PGPASSFILE=~/.pgpass
export PGUSER=postgres
export PGDATABASE=postgres
export PGPORT=5432



Regards,
Michael Vitale


Friday, January 4, 2019 9:21 AM
Hi,

I have 10+ postgresql clusters (v 9.6) running on one machine - each having their own data directory and port. They all share same binaries though, and this is now giving me some headache.. I cannot shutdown all clusters at the same time, so upgrading them is quite impossible.

I know that running several versions of postgres is possible on one machine - I suppose this would also work out with same version running on different locations, like /db1/PostgreSQL/10, /db2/PostgreSQL/10.. etc..? Has anyone any experience with this kind of problem? 

All help and ideas appreciated! :-)

Thanks,
Erika

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

Предыдущее
От: Rui DeSousa
Дата:
Сообщение: Re: Multiple postgresql clusters with same version and separatebinaries
Следующее
От: rajan
Дата:
Сообщение: Re: Is there any way that one of the Postgres Background/Utilityprocess may go down?