Thread: BUG #16851: Master DB was unreachable and both master,slave entered into Standby while performing the switchover

The following bug has been logged on the website:

Bug reference:      16851
Logged by:          Shaanthi Negathanan
Email address:      shaanthinegathanan.pm@gmail.com
PostgreSQL version: 9.6.1
Operating system:   Linux
Description:

We are facing an error while switchover the master to slave using 
efm promote dbname -switchover and both master and slave entered into
standby mode. Did anyone faced this issue before or it is an bug?


Below the error log
Body:
EFM node:     172.xxx.xx.xxx
Cluster name:  pg_xx_prod
Database name: dbname
VIP support:   ENABLED
 
An unexpected error has occurred on this node. Please
check the agent log for more information. Error:
Could not stop database:
exit status: 1
error:
Job for postgresql-9.6.service canceled.
 
1/24/21 11:49:32 PM com.enterprisedb.efm.nodes.EfmAgent stopMasterDatabase
WARNING: Could not stop database. Will not be able to continue switchover
Command: sudo /usr/efm-2.1/bin/efm_root_functions stopdbservice pg_apb_prod.
Result:
exit status: 1
error:
Job for postgresql-9.6.service canceled.
 
1/24/21 11:49:32 PM com.enterprisedb.efm.nodes.EfmAgent startMonitoring
SEVERE: Could not stop master database before promoting standby. Switchover
cannot continue.
 
1/24/21 11:49:32 PM com.enterprisedb.efm.nodes.EfmAgent startMonitoring
WARNING: Attempting to resume monitoring.
 
1/24/21 11:49:32 PM com.enterprisedb.efm.DBMonitor checkOnce WARNING: Could
not connect to database at 172.xxx.xx.xxx:
org.postgresql.util.PSQLException: FATAL: the database system is shutting
down, state: 57P03

/24/21 11:49:32 PM com.enterprisedb.efm.nodes.EfmAgent startMonitoring
WARNING: Can no longer connect to database.
 
1/24/21 11:49:32 PM com.enterprisedb.efm.utils.VipMonitor startMonitoring
INFO: Starting vip monitor (to ensure this node isn't assigned the VIP)
 
1/24/21 11:49:32 PM com.enterprisedb.efm.nodes.EfmZombie <init> INFO: The
auto resume period set to 0, so agent will stay IDLE until stopped or
resumed manually.
 
1/24/21 11:49:32 PM com.enterprisedb.efm.nodes.EfmAgent setAgentDelegate
INFO: setAgentDelegate: I was Master, will now be Idle.
 
1/24/21 11:49:32 PM com.enterprisedb.efm.nodes.EfmAgent setAgentDelegate
INFO: Setting agent to type Idle
 
1/24/21 11:49:32 PM com.enterprisedb.efm.ClusterState removeAddress INFO:
Removing master address dxxxxx-xxxxx
 
1/24/21 11:49:32 PM com.enterprisedb.efm.nodes.EfmAgent startMonitoring
INFO: Setting state back to RUNNING instead of PROMOTE
 
1/24/21 11:51:33 PM com.enterprisedb.efm.nodes.EfmAgent doHandle INFO:
responding to db status request with status:
Idle%%172.19.146.217%%true%%false%%


On Wed, Feb 3, 2021 at 6:36 PM PG Bug reporting form
<noreply@postgresql.org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference:      16851
> Logged by:          Shaanthi Negathanan
> Email address:      shaanthinegathanan.pm@gmail.com
> PostgreSQL version: 9.6.1
> Operating system:   Linux
> Description:
>
> We are facing an error while switchover the master to slave using
> efm promote dbname -switchover and both master and slave entered into
> standby mode. Did anyone faced this issue before or it is an bug?

EFM is not a part of PostgreSQL -- it's a proprietary product from
EnterpriseDB, and you should contact their support for help with it.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/