cancel
Showing results for 
Search instead for 
Did you mean: 

Running multiple postgresql instance with EFM

SOLVED
Silver Adventurer

Running multiple postgresql instance with EFM

Hi Folks,

               i have a query to dissucss with you about multiple instance with EFM.

Actully we are plan to install multiple instance and replicate to Slave server with multiple's,.

 

How we plan to EFM?

-can possibel to copy the postgresql instance service file.

-is it possible to copy the EFM.properties and node files?

 

Thanks.

Diny

Tags (1)
2 ACCEPTED SOLUTIONS

Accepted Solutions
EDB Team Member

Re: Running multiple postgresql instance with EFM


@Din2pg wrote:

Hi @bbissett @sachinfate 

                     What about the VIP,can i assing one vip for both instance or one instance one VIP.

Which one is advisable.if failover happen how will VIP will react and swithcing(promotions).

 

Thanks!!!


 

I would think you'd need a separate vip for each cluster. That way if there's a failover or switchover in one it doesn't affect the vip of the other. I hope I understood the question correctly.

 

Thanks,

Bobby

 

Silver Adventurer

Re: Running multiple postgresql instance with EFM

@bbissett @sachinfate 

                                  THANKS FOR YOUR SUPPORT.

                 The setup has been completed successfully..Everything is fine and many many appreciation

.

Thanks for your kind and prompt response.

 

Regards

Diny

                                           

12 REPLIES 12
EDB Team Member

Re: Running multiple postgresql instance with EFM

Hi Diny, We are assuming that you are runnig multiple master postgresql instances on single server. You need to provide different name to each efm cluster instead of the default cluster name i.e. efm and also need to create the differnt service file for each EFM cluster. -can possibel to copy the postgresql instance service file. Yes, you have to copy the postgresql instance service file and modify it as required. -is it possible to copy the EFM.properties and node files? Yes, you need to copy the efm.properties and efm.nodes file but rename it with the cluster name and do the required changes in those files (like bind_address).

Silver Adventurer

Re: Running multiple postgresql instance with EFM

Hi Sachin,

                  This is advicable in production environment?

Our planning is one master with 2 instances and streaming replication must be configured between the Master node(2 instances) and the standby node(2 instances).

 

Then will plan to configure the EFM to the both server's inlcude both instances.

Questions:-

we can clone the two postgres on same version..

How can we clone a EFM and how ill confifgure with two instances to efm,

FYI:-

------

efm.png

EDB Team Member

Re: Running multiple postgresql instance with EFM

Hi,

As per your diagram, for data1 cluster name will be like "A" and for data2 it will be like "B" on all three servers.

As like Postgres you can create separate EFM service for each cluster, yed need to provide the value for the parameter Environment=CLUSTER=<A> in EFM service file.

You can refer the below documentation link for more details :

https://www.enterprisedb.com/edb-docs/d/edb-postgres-failover-manager/user-guides/user-guide/3.5/toc...

Silver Adventurer

Re: Running multiple postgresql instance with EFM

Hi @sachinfate 

               Can you please share the document.

How to clone the efm service file and properties file.

 

Thanks!!!

EDB Team Member

Re: Running multiple postgresql instance with EFM

Hi Deny,

 

There is no such document available. However, you can follow the following steps :

 

Copy the EFM service file with a different name. 

Make the required change in the file.

For Eg.

[root@vm-test-master ~]# cp /usr/lib/systemd/system/efm-3.5.service /usr/lib/systemd/system/efm-3.5_data1.service
[root@vm-test-master ~]# cat /usr/lib/systemd/system/efm-3.5_data1.service
# Copyright EnterpriseDB Corporation, 2015-2019. All Rights Reserved.
[Service]
Type=forking
TimeoutSec=120
Environment=CLUSTER=efm-data1
User=efm
PIDFile=/var/run/efm-3.5/efm-data1.pid

ExecStart=/bin/bash -c "/usr/edb/efm-3.5/bin/runefm.sh start ${CLUSTER}"
ExecStop=/bin/bash -c "/usr/edb/efm-3.5/bin/runefm.sh stop ${CLUSTER}"

KillMode=process

[Install]
WantedBy=multi-user.target
[root@vm-test-master ~]#

 

Create a copy of the original efm.properties file with the cluster name :  

[root@vm-test-master efm-3.5]# cp efm.properties efm-data1.properties

 

Make the changes in file accordingly.

 

Hope this will help you. 

 

 

Silver Adventurer

Re: Running multiple postgresql instance with EFM

Hi @sachinfate 

      Thanks first..actually we plan this type of installation for maintence purpose and reduce server core's.

 

Any impact if we could use single efm bin to both efm service(include the Postgres bin also). Any advisable to use diffrent plan's.

 

 

/pg_home/10.9/bin -----Data1/--------------------Same as efm?

/pg_home/10.9/bin ----Data2/---------------------Same as efm?

 

 

Thanks!!!

EDB Team Member

Re: Running multiple postgresql instance with EFM

Hi,

Yes, you can use the single binary for both the EFM clusters.

EDB Team Member

Re: Running multiple postgresql instance with EFM

 


@Din2pg wrote:

Hi @sachinfate 

               Can you please share the document.

How to clone the efm service file and properties file.


 

You just make copies and edit them. You can't just make copies and expect it to work without changes because you'd have multiple agents all trying to use the same ports, monitor the same database, etc.

 

The documentation link shared before has the steps. Here's the specific chapter:

https://www.enterprisedb.com/edb-docs/d/edb-postgres-failover-manager/user-guides/user-guide/3.5/EDB...

 

Cheers,

Bobby

 

 

Silver Adventurer

Re: Running multiple postgresql instance with EFM

Hi @bbissett @sachinfate 

                     What about the VIP,can i assing one vip for both instance or one instance one VIP.

Which one is advisable.if failover happen how will VIP will react and swithcing(promotions).

 

Thanks!!!