cancel
Showing results for 
Search instead for 
Did you mean: 

EFM-SWITCHOVER

SOLVED
Level 2 Adventurer

EFM-SWITCHOVER

Hi Folks

we have a 1 master and 1 standby and 1 witness servers with EDB-EFM Cluster setups.

    Master server automatically promoted to slave few days back.

    Now we are plan  maually promote to old stage like (OLD:- Master<-->slave  ====>NOW TRY:- Slave--->Master.)

    Please advice me how to do manual..donwtime is there arround 3hr+buffertime 1hr.

Please help me siva and team

@sivamekala  @dbedb 

 

 

Regards

Jithy

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
EDB Team Member

Re: EFM-SWITCHOVER

Hi,

 

It might be harder to get an answer because of "EFM" in the title, and EFM isn't related to how you set up replication. EFM is just a tool that can be used to monitor database clusters that are using streaming replication. I've asked our team to look at this question to answer your replication questions, but in the meantime can try to help a little. Feel free to ask replication questions with a different title and you might get a different set of people to help. :)

 

You have good links for some of the questions already. Here is some info on the others:

  • "what is active-passive and active -active" Active-passive is probably what you think about when you think of replication. There is one master database and one or more standby databases that mirror the information in the master. Thus, if the master dies, the information still exists in the standby. Active-active is a more complicated multi-master set up. Some more information here: https://www.enterprisedb.com/xdb-replication-server-multi-master
  • Types of replication: see https://www.postgresql.org/docs/current/high-availability.html https://www.postgresql.org/docs/10/logical-replication.html https://www.postgresql.org/docs/10/wal-internals.html -- hopefully those help
  • Sync vs async. The links above cover it I think, but a 'sync' replica means that data is saved on the replica before it's considered saved on the master. There is more than one level of this, but the idea is that data is written in two places before the transaction is considered complete. This is safer, but slower. An asynchronous standby receiveds information from the master to back up data, but there is always a chance that a master database could die or be disconnected from the network before its saved data has been passed on to a standby.
  • Hot vs warm standby: these terms both can be applied to a streaming replication standby. The difference is that a "warm" standby (meaning 'hot_standby=off' in the configuration file) does not accept connections or db requests. It can't be used for applications. A hot standby can be used for read queries, which can be very useful with a load balancer to take some work away from the master database.

Cheers,

Bobby

 

8 REPLIES 8
EDB Team Member

Re: EFM-SWITCHOVER

Hi Jithesh, 

 

Hope you are doing good. 

Could you please provide some more info about your concern. 

 

Actually Master server never promotes it self. Only SLAVE server can be able to promote. 

 

Definition of Promote: Promoting is a small task to convert slave(read only) server to master(read+write) using pg_ctl promote command. 

Command: ${pg_bin}/pg_ctl -D ${Data_directory} promote

 

Definition of Switchover: Switchover is a process of exchanging database server roles. 

Ex: Slave becomes master and Master becomes slave after successful swichover. 

 

Note: If you want to do just promote slave server to master(read+write) you can use efm command with promote tag. Or

 If you want to do switchover (Exchaning roles), EFM it self will do this when you request -switchover tag with promote command. You can see same in 17 page of document "Performing Swichover".

 

EFM Documentation for v3.3 : https://get.enterprisedb.com/docs/EDB_Failover_Manager_Guide_v3.3.pdf

 

Hope this information helps, Or Please let us know if you still face any issues.

 

Regards

Siva.

Level 2 Adventurer

Re: EFM-SWITCHOVER

Hi @sivamekala 

                        Yes,this is good..i understanding many many thanks.

 

1.what is the differences between efm-replication and normal replication.(what internals of the these two)?

2. the command of scp in archive_command?

3.without scp also the data transferred successfully on slave side and synced.?

4.what is the differences in above both?

 

Regards

Jithy    

Highlighted
EDB Team Member

Re: EFM-SWITCHOVER

Hi @Wallece_Jithy2,

 

Please refer answers to your queries:

 

1.what is the differences between efm-replication and normal replication.(what internals of the these two)?

- EFM does not have functionality to set up the replication, you need to set up the streaming replication which is built in feature in Postgres.

- The EFM document contains the steps to set up the streaming replication, EFM works only after you have set up the streaming replication.

 

2. the command of scp in archive_command?

- Using scp in archive_command, you can store the archives on other servers, i.e. to the standby server or the central backup server.

 

3.without scp also the data transferred successfully on slave side and synced.?

- Yes, the streaming replication uses the WAL sender and WAL receiver processes to do this. However, if due to heavy activity and large archive generation, standby goes out of sync and WAL receiver process breaks, it will not come up in sync, in that case, the restore_command from recovery.conf comes in picture.

- You can set up restore_command to apply the WAL archives from the archive location which you have set up using the archive_command.

 

4.what is the differences in above both?

- Answered above.

 

Please get back to us in case of any issues/queries.

 

Regards,

Sudhir

Level 2 Adventurer

Re: EFM-SWITCHOVER

Hi @slonkar .,

               Thanks for sharing this information,

1.what is active-passive and active -active.?

2.what is wal-based replication and xlog based replication.?

3.what is sycn and async(how to configure synchronous replication)?

 

Level 3 Adventurer

Re: EFM-SWITCHOVER

>1.what is active-passive and active -active.?

Could you please elaborate on what active-passive and active -active you are referring to ?

 

>2.what is wal-based replication and xlog based replication.?

Kindly go through https://www.postgresql.org/docs/10/warm-standby.html

 

>3.what is sycn and async(how to configure synchronous replication)?

Kindly refer link https://www.postgresql.org/docs/10/warm-standby.html#SYNCHRONOUS-REPLICATION

Level 2 Adventurer

Re: EFM-SWITCHOVER

@Ranjan @sivamekala 

1.what is active-passive and active -active.?

Could you please elaborate on what active-passive and active -active you are referring to ?

                              REPLICATIONS

2.What is HOT and WARM standby?

EDB Team Member

Re: EFM-SWITCHOVER

Hi,

 

It might be harder to get an answer because of "EFM" in the title, and EFM isn't related to how you set up replication. EFM is just a tool that can be used to monitor database clusters that are using streaming replication. I've asked our team to look at this question to answer your replication questions, but in the meantime can try to help a little. Feel free to ask replication questions with a different title and you might get a different set of people to help. :)

 

You have good links for some of the questions already. Here is some info on the others:

  • "what is active-passive and active -active" Active-passive is probably what you think about when you think of replication. There is one master database and one or more standby databases that mirror the information in the master. Thus, if the master dies, the information still exists in the standby. Active-active is a more complicated multi-master set up. Some more information here: https://www.enterprisedb.com/xdb-replication-server-multi-master
  • Types of replication: see https://www.postgresql.org/docs/current/high-availability.html https://www.postgresql.org/docs/10/logical-replication.html https://www.postgresql.org/docs/10/wal-internals.html -- hopefully those help
  • Sync vs async. The links above cover it I think, but a 'sync' replica means that data is saved on the replica before it's considered saved on the master. There is more than one level of this, but the idea is that data is written in two places before the transaction is considered complete. This is safer, but slower. An asynchronous standby receiveds information from the master to back up data, but there is always a chance that a master database could die or be disconnected from the network before its saved data has been passed on to a standby.
  • Hot vs warm standby: these terms both can be applied to a streaming replication standby. The difference is that a "warm" standby (meaning 'hot_standby=off' in the configuration file) does not accept connections or db requests. It can't be used for applications. A hot standby can be used for read queries, which can be very useful with a load balancer to take some work away from the master database.

Cheers,

Bobby

 

EDB Team Member

Re: EFM-SWITCHOVER


@sivamekala wrote:

 

Definition of Promote: Promoting is a small task to convert slave(read only) server to master(read+write) using pg_ctl promote command. 

Command: ${pg_bin}/pg_ctl -D ${Data_directory} promote

 

Or by creating the trigger file specified in recovery.conf. EFM, for example, creates a trigger file rather than using pg_ctl to promote a standby.

 

Cheers,

Bobby