Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gfRsz-0001IJ-RH for pgsql-general@arkaria.postgresql.org; Fri, 04 Jan 2019 15:59:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gfRsy-0003it-CC for pgsql-general@arkaria.postgresql.org; Fri, 04 Jan 2019 15:59:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gfRsy-0003ih-05; Fri, 04 Jan 2019 15:59:48 +0000 Received: from mout.perfora.net ([74.208.4.196]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gfRsu-0004Gu-4A; Fri, 04 Jan 2019 15:59:46 +0000 Received: from [192.168.1.101] ([98.169.208.73]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0Lwp0Y-1hPdVj2yPA-016OXm; Fri, 04 Jan 2019 16:59:39 +0100 Message-ID: <5C2F82EA.5070601@sqlexec.com> Date: Fri, 04 Jan 2019 10:59:38 -0500 From: MichaelDBA User-Agent: Postbox 5.0.25 (Windows/20180328) MIME-Version: 1.0 To: Rui DeSousa CC: Erika Knihti-Van Driessche , pgsql-admin@lists.postgresql.org, pgsql-general@lists.postgresql.org Subject: Re: Multiple postgresql clusters with same version and separate binaries References: <5C2F6E8C.7070402@sqlexec.com> <895E2FE2-47E1-472C-B310-B30CA7DC7409@crazybean.net> In-Reply-To: <895E2FE2-47E1-472C-B310-B30CA7DC7409@crazybean.net> Content-Type: multipart/alternative; boundary="------------030905080407050201000304" X-Provags-ID: V03:K1:Nk7jqSvP+iXG/1+Q08th+viJTfgltxwcKtWff0DxqdvtwP1w4BG QXoL6mrsSz1Sp3X2IGZerdRanPAcrrU+0SvMu0tbUlwSQ2lHZMrmmnYpXGNyImo6yLCxyju P20jPD0RV2kN46tVySiX15MF/cx49gIfNAewTKd3mHMJ66jjbzsnLHIKNW7zDGex5Uj1MTr NuOKZaBzebS0EQ0sctYxw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:x5khfghIjaE=:bOlckqMEiEVSWMT189irmo aP3em3b+/GKpvAw9xGwuf1YuWc9aWtDdfVt+7BwAhSRhwkbdAV7xWqxd4qU6TpZNRvtnU3ASJ Qcn7JPBf8y0P4PhYN3mQ2WbNMZvbIz+iNEWBMPQMm8e7eMKdTmNTtl6mrp5WDhVPFRqbbrjNm 9D+bRNgB++JRNGSzTyN4F5vKtXTmhGeNipKyH+QfiCccEGdZrMYD6XtXiUZfqEGIm83KETvno MiqYbqCxbF9csYNWzVl0w/J/oeVri3zwJpZ50aGJFHDygMvBqXzVb2LDrbrUiEOQ4fBOTphrp ntr+KyAf91ATbFT5sjxyP6vIylDsbY3DgNIpkuZSH3PzttCEV+rs+d3DCMnhiK9ErvAeBd69/ FX/dzfvUEgLEn5HTBmWCm3nTUJBAbTxtc9B1gvhgLDBHLLNF4SYvA3CEcySAuJc6QynWene5o Nca6sAUBemPq2GPIf4els5HxodXA+kqd47pZiGHcGsG976QFOovEimf3j1EieptBCFGs6joUd 09jDBnP1CovWVsPaIA9M5Oe2/61eNAAqujpFlRw0/KrWDmQFmwQZqVVDL+PRXt44zRtu+x7bB 49VcfE1BgTTZeyjmHMGHVlyMmcNgzbUiqizTKL0k0FwJ5QoZw9nQcSyH0dIx1bXkuUP9pFOJ2 XSSkg0vy0JxqrlmtvqPUDBqIwgwpTC2Xld9sNUFgIaPh72db/u70K3k283OHmulBPV5vwgWNi pkDtC+yVuRF1AHs81WO5wRFKJvzd0N27mE5odCUF4YFERCJfZcCm5sHvCQA= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------030905080407050201000304 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. > Rui DeSousa > 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. > > MichaelDBA > 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 > > > Erika Knihti-Van Driessche > 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 --------------030905080407050201000304 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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

--------------030905080407050201000304--