Re: repmgr cannot bring up the standby database after switchover manaully

From: Tayyab Fayyaz <tayyab(dot)humayl(at)gmail(dot)com>
To: Imran Khan <imran(dot)k(dot)23(at)gmail(dot)com>
Cc: Chris Lee <clee(dot)hk(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: repmgr cannot bring up the standby database after switchover manaully
Date: 2025-10-01 10:25:04
Message-ID: CAFVRaQ3g9MhR54kVLPLTjhb=i3XvnBo1JikdLrLvVpw5MbXJ+g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello Imran,

This issue is not related to switchover; its failover completed
successfully, but the previous primary was not re-added as a standby. The
behavior can be seen in the attached screenshots

[image: image.png]

Tayyab

On Wed, Oct 1, 2025 at 3:12 AM Imran Khan <imran(dot)k(dot)23(at)gmail(dot)com> wrote:

> Hi Tayyab,
>
> Is this a default behavior? We have 4 nodes cluster but never had issue
> in switchovers.
>
> Thanks,
> Imran
>
> On Wed, Oct 1, 2025, 1:10 PM Tayyab Fayyaz <tayyab(dot)humayl(at)gmail(dot)com>
> wrote:
>
>> Hello Chris,
>>
>> I faced this issue it will not add automatically as standby you have to
>> add it manually.
>>
>> But I wrote a script which perform to add old primary as standby once
>> it's back online.
>>
>> Tayyab
>>
>>
>> On Wed, 1 Oct 2025, 3:02 pm Chris Lee, <clee(dot)hk(at)gmail(dot)com> wrote:
>>
>>> Hi all,
>>>
>>> I have 2 postgresql servers. One is the primary and another one is the
>>> standby. I am trying to setup repmgr to do the switchover manually.
>>> Passwordless ssh have been setup for postgres ID on both servers.
>>>
>>> I use this command "repmgr standby switchover --log-level=DEBUG
>>> --verbose". The standy database is able to promote to be the primary. For
>>> the previous primary database, it was shutdown. It was not able to bring up
>>> as standby by repmgr.
>>>
>>> Does anyone encounter this issue before? Thanks a lot for any
>>> suggestions.
>>>
>>> Here is my OS and DB versions:
>>>
>>> OS version: CentOS Stream release 8
>>> Postgres DB version: 15.12
>>> rempmgr version: 5.5.0
>>>
>>> Here is the repmgr conf files:
>>> >>>>>
>>> node_id=1 # Use 2 on standby
>>> node_name='primary'
>>> conninfo='host=centos804 user=repmgr dbname=repmgr password=xxx
>>> connect_timeout=15'
>>> use_primary_conninfo_password=true
>>> data_directory='/var/lib/pgsql/15/data' # Adjust for your setup
>>> pg_bindir='/usr/pgsql-15/bin'
>>> service_start_command = 'sudo systemctl start postgresql-15'
>>> service_stop_command = 'sudo systemctl stop postgresql-15'
>>> <<<<<
>>>
>>> >>>>>
>>> node_id=2 # Use 2 on standby
>>> node_name='standby'
>>> conninfo='host=centos803 user=repmgr dbname=repmgr password=xxx
>>> connect_timeout=15'
>>> use_primary_conninfo_password=true
>>> data_directory='/var/lib/pgsql/15/data' # Adjust for your setup
>>> pg_bindir='/usr/pgsql-15/bin'
>>> service_start_command = 'sudo systemctl start postgresql-15'
>>> service_stop_command = 'sudo systemctl stop postgresql-15'
>>> <<<<<
>>>
>>> Regards,
>>> Chris
>>>
>>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Chris Lee 2025-10-01 10:30:20 Re: repmgr cannot bring up the standby database after switchover manaully
Previous Message Imran Khan 2025-10-01 10:12:40 Re: repmgr cannot bring up the standby database after switchover manaully