问题
I am trying to setup (half way done already) 2 Postgres clusters, say prod and test (not instances) on 2 machines say .114 and .115.
One cluster has 2 instances. Each instance runs on each of machines.
- I am trying to make .114 as primary for test cluster while .115 will work as secondary for it.
- For prod cluster .115 will work as primary and .114 as secondary.
Although it sounds not-good that i have test and prod on same machines but this is what customer needs now. I have already setup test cluster by bringing up a vip .119 (from same subnet as other machines are) and is going to setup prod cluster.
In fact, I have already setup the instances for prod cluster with replication and now fixing pgpool and vip. I am using ens192 interface as rhel has deprecated eth0 (mentioned in some standard docs)
For prod cluster I am more concerned how the vip will behave in case of fail-over.
I have following configuration
- Postgres version 10.6
- Pgpool2 4.0.3
- Streaming replication with replication slot ( not wal archive)
- RHEL 7.6
- hosted as VM's
RHEL Machines are decent configuration so no problem on that part.
My question:
- Is it possible to have different vip assigned to different machines .114 and .115 in above case. I use interface ens192:0 for test and is going to use ens192:1 for prod.
- Any implication(complication going forward) or am i totally doing it wrong. Consider the scenario, when test cluster fails over and now .115 is primary for it. At the same time suppose prod cluster is running in normal mode and for this .115 is still the primary.
Does it sound okay?
EDIT I have already setup ens192:1 on .115
来源:https://stackoverflow.com/questions/54999672/multiple-postgres-clusters-not-instances-on-2-machines