Re: Multiple postgresql clusters with same version and separate binaries - Mailing list pgsql-admin

From Erika Knihti-Van Driessche
Subject Re: Multiple postgresql clusters with same version and separate binaries
Date
Msg-id CALgXhV-Hi0rL8cakzBp3cL33EobCwuCyC9UWY2MY2m8BGFbOnA@mail.gmail.com
Whole thread Raw
In response to Re: Multiple postgresql clusters with same version and separatebinaries  (Stéphane KANSCHINE <stephane@hexack.fr>)
Responses Re: Multiple postgresql clusters with same version and separatebinaries  (Stéphane KANSCHINE <stephane@hexack.fr>)
List pgsql-admin
Hi,

I'm sure I'd regret creationg all the extra work for myself, but.. the customer insists that not all (at least production) applications may go down at the same time. 
I have streaming replication in place also, and I think for minor upgrade it won't be a problem to first upgrade standby, resync replication, then failover primary to newer minor version standby (altho I did read that this is not supported but will likely work..). For major upgrade this isn't an option though, or I would have to implement Slony (I think)..

In any case, currently I have 17  very small clusters running on an acc env, half of them are in fact for dev and other half for acc with streaming replication. It all started with one cluster of course, but during the years it has got a bit out of hand. Applications are all on separate clusters, because I have to be able to stop them separately. I have always, without thinking further, used initdb from that one set of binaries, to create a new cluster. If I'd separate the binaries, then I'd also have to indeed create separate profiles to make sure I use correct set of binaries for each cluster.. which will make it all quite complicated.. 

So, just creating separate services isn't really an option, because it won't help me with the upgrades.

Cheers,
Erika

On Mon, 7 Jan 2019 at 15:36, Stéphane KANSCHINE <stephane@hexack.fr> wrote:
Le ven.  4 janv., vers 16:30, Erika Knihti-Van Driessche exprimait :

> Hi,

Hey !

> Thanks all for your replies and help! I already thought that it’ll
> be possible to just install binaries in different locations.

It's not necessary, you "only" have to separate services, one
thing that manages the services files in the Debian packages. It also
manages clusters init and stop/start/etc globally for services named :

- postgresql@10-cluster1
- postgresql@10-cluster2
- ...

> Oh, and I’m on RHEL 7. [...] Previously I did do a minor upgrade -
> shutdown all clusters and upgrade, then startup all.. but now they
> start doing difficult with downtime for all applications at the same
> time, so with next upgrade, I’ll separate all binaries.

Please don't, you'll regret it when you'll have to upgrade as you'll have
to uprade all your binaries. You should create separated services
files and a global one.

Regards,
--
Stéphane KANSCHINE - https://www.hexack.fr./ - https://www.nuajik.io./
stephane@hexack.fr
  +33 6 64 31 72 52

pgsql-admin by date:

Previous
From: selva kumaran
Date:
Subject: Doubt On JSON in Postgresql
Next
From: Robert Simmons
Date:
Subject: Re: Database migration across different operating systems