Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v41w9-007Lm9-8R for pgsql-admin@arkaria.postgresql.org; Wed, 01 Oct 2025 18:52:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v41w6-004ic4-L2 for pgsql-admin@arkaria.postgresql.org; Wed, 01 Oct 2025 18:52:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v41w5-004ibw-W5 for pgsql-admin@lists.postgresql.org; Wed, 01 Oct 2025 18:52:22 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v41w3-000v6v-2h for pgsql-admin@postgresql.org; Wed, 01 Oct 2025 18:52:21 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-743ba48eb71so21662297b3.1 for ; Wed, 01 Oct 2025 11:52:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759344739; x=1759949539; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ck7zyCgvwK16jyQWvuHNx9VFvlbr1QTQF1PIPuB/bOg=; b=SUKnkevvDKi7lR5gk3dn2/sJc2GKwEZApt4r+DXVjfpdOpKyNv0p24aWaCN+JuEBw4 IF7T9SNI84CfgBM/QBWw60E2zq0UfHJWWeG27d+Q6LAdCZC/sBx3pEFu8uRIkGwieqqI PXOq6Up6Xp2xeQBqNvN9lmrB1D/85JK7qCVWEmJ2MQBRsEM6EjDTngijo67uN7LAW9MN WmGkkC8u8B20FlmeZWNNEry+Q1sqUhodEnr+RIXqFjR7t75HRnlvYc0wFHbhKseklkrV 1r8Gs4110yMBuhjhN+R8lFXjHANRlOdV81LgXds1qlZ9JYlIDbLcKiN2KQ9hjDn9wKb4 OLuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759344739; x=1759949539; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ck7zyCgvwK16jyQWvuHNx9VFvlbr1QTQF1PIPuB/bOg=; b=Wfk7z3AmyiiMMrKgUSgv7tgKdOZN0KNmF7Zi9aw1J90p3ok1VMIg+J/KWubQN/+nOl kKwxnfF+L97mJSnXCufzwco4+2kUkyCV1/4g7dQWdiwFFKlCtTY5ZhhgVEgwKhpm4/R5 AqK9aj+uLtMrL+gNpHSsb8mx411wUHDkmg24W7E1w+BIzhx9hN15Tf3OP2g0J5Afc8jR lLtWJGGiTC39Ap3C0cRMHYvewL9MVAT9AIqOTGrPxqwCo8K8EnkB/Pqb2SEa0yShkfGM tofVGHR0bLqKs8R1VhOfFmE94CVSQpS2IAy6nF7W0HXX3AMX7y3kc4MiNU3Dl5R7WvvY vQHg== X-Forwarded-Encrypted: i=1; AJvYcCWvbh5R4rI8p5mgcn2NzTtg6gIttrvHEA7aiLIWtuzLAIHttBhtdMvklCEBXHvsm53pv9AA4Zz94gyIUA==@postgresql.org X-Gm-Message-State: AOJu0YyOYo7P9plhIDc2pjg9VhLgTjdfheDLq5q2cGJjo2fgka0XO8hn pJzHBugyqD7mOy/tXk+wUPGfYykJe48Sg9V1QOqF/LT2S93EOwifdL2/LHWY9tkWurN6FT3RE67 BLu5t58TRy4Xr7BokSYYpsGRRlC05ESs= X-Gm-Gg: ASbGncv3iIX1sCXXLbfMlWIy2mfgtyGAVgBLv+RW11q+dMZAxbZ4Q6jtAZ5hQ5LU8cv MbhAU1EOjMrOn7g6JOPQjne4LM0lFyPg7SqyA66i1QaVD+fx4YGF3Isb/kTFKF6ayaiZrh/OO9y wItBLTiCaqN3ay+uwOLwnwgCZNYzdFQauX6l7lYv+zmVEoPKEExjse0xUhzvPHkgBBR9HumrfSF zSoXBOkkncGhFAcgrpozQMkEbAxHEF/ZD5I+y71mUkO X-Google-Smtp-Source: AGHT+IGlrVch78z2mND4LaHyKRt3WCAW/4Q/F5wt6HdKsvRp8f9RjjyMILlgnFYYD9uXeD0lhkR/GlWrvTegAKiEwoA= X-Received: by 2002:a53:ef8f:0:b0:636:20c2:8eb8 with SMTP id 956f58d0204a3-63b83a7441bmr751422d50.6.1759344739089; Wed, 01 Oct 2025 11:52:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fernando Hevia Date: Wed, 1 Oct 2025 15:52:06 -0300 X-Gm-Features: AS18NWBmlvHAem2iDAPoE4zTmNqU728LWFv42hME5RTi8jEQ22gjODZhbzh8k6k Message-ID: Subject: Re: repmgr cannot bring up the standby database after switchover manaully To: Chris Lee Cc: Imran Khan , Tayyab Fayyaz , pgsql-admin Content-Type: multipart/alternative; boundary="00000000000035fffc06401d5e58" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000035fffc06401d5e58 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > 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=3DDEBUG > --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. In a switchover the primary server is shutdown and restarted as a standby server after the newly promoted primary (former secondary) node has been started. If the primary did not start, there must have been an issue since this is not the standard behavior for a switchover command. Have you checked the Postgres log file for the previous primary? You should find the startup failure cause in the log. Regards, Fernando El mi=C3=A9, 1 oct 2025 a la(s) 7:30=E2=80=AFa.m., Chris Lee (clee.hk@gmail= .com) escribi=C3=B3: > Hi Tayyab, > > Thanks for your information . I also want to find out whether that is the > default behavior, or I am not configuring repmgr correctly. > > Regards, > Chris > > On Wed, 1 Oct 2025, 18:12 Imran Khan, 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=E2=80=AFPM Tayyab Fayyaz >> 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=E2=80=AFpm Chris Lee, wrot= e: >>> >>>> 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=3DDEBUG >>>> --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 bri= ng 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=3D1 # Use 2 on standby >>>> node_name=3D'primary' >>>> conninfo=3D'host=3Dcentos804 user=3Drepmgr dbname=3Drepmgr password=3D= xxx >>>> connect_timeout=3D15' >>>> use_primary_conninfo_password=3Dtrue >>>> data_directory=3D'/var/lib/pgsql/15/data' # Adjust for your setup >>>> pg_bindir=3D'/usr/pgsql-15/bin' >>>> service_start_command =3D 'sudo systemctl start postgresql-15' >>>> service_stop_command =3D 'sudo systemctl stop postgresql-15' >>>> <<<<< >>>> >>>> >>>>> >>>> node_id=3D2 # Use 2 on standby >>>> node_name=3D'standby' >>>> conninfo=3D'host=3Dcentos803 user=3Drepmgr dbname=3Drepmgr password=3D= xxx >>>> connect_timeout=3D15' >>>> use_primary_conninfo_password=3Dtrue >>>> data_directory=3D'/var/lib/pgsql/15/data' # Adjust for your setup >>>> pg_bindir=3D'/usr/pgsql-15/bin' >>>> service_start_command =3D 'sudo systemctl start postgresql-15' >>>> service_stop_command =3D 'sudo systemctl stop postgresql-15' >>>> <<<<< >>>> >>>> Regards, >>>> Chris >>>> >>> --00000000000035fffc06401d5e58 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I ha= ve 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 ss= h have been setup for postgres ID on both servers.

I use this comman= d "repmgr standby switchover --log-level=3DDEBUG --verbose". The = standy database is able to promote to be the primary. For the previous prim= ary database, it was shutdown. It was not able to bring up as standby by re= pmgr.=C2=A0=C2=A0

In a switchover the prima= ry server is shutdown and restarted as a standby server after the newly pro= moted primary (former secondary) node has been started.
If the pr= imary did not start, there must have been an issue since this is not the st= andard behavior for a switchover command.

Have you= checked the Postgres log file for the previous primary? You should find th= e startup failure cause in the log.

Regards,
=
Fernando

=C2=A0

El= mi=C3=A9, 1 oct 2025 a la(s) 7:30=E2=80=AFa.m., Chris Lee (clee.hk@gmail.com) escribi=C3=B3:
Hi Tayyab,
Thanks for your information . I = also want to find out whether that is the default behavior,=C2=A0 or I am n= ot configuring repmgr correctly.

Regards,
Chris

On Wed, 1 Oct 2025, = 18:12 Imran Khan, <imran.k.23@gmail.com> wrote:
Hi Tayyab,

=
=C2=A0Is this a default behavior? We have 4 nodes c= luster but never had issue in switchovers.=C2=A0
Thanks,=C2=A0
Imran

On= Wed, Oct 1, 2025, 1:10=E2=80=AFPM Tayyab Fayyaz <tayyab.humayl@gma= il.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&= #39;s back online.

Tayya= b


On Wed, 1 Oct 2025, 3:02=E2=80=AFpm Chris Lee, <clee.hk@g= mail.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 switchov= er --log-level=3DDEBUG --verbose". The standy database is able to prom= ote to be the primary. For the previous primary database, it was shutdown. = It was not able to bring up as standby by repmgr. =C2=A0

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
Po= stgres DB version: =C2=A015.12
rempmgr version: 5.5.0

Here is the= repmgr conf files:
>>>>>
node_id=3D1 =C2=A0# Use 2 on= standby
node_name=3D'primary'
conninfo=3D'host=3Dcentos8= 04 user=3Drepmgr dbname=3Drepmgr password=3Dxxx connect_timeout=3D15'use_primary_conninfo_password=3Dtrue
data_directory=3D'/var/lib/pg= sql/15/data' =C2=A0# Adjust for your setup
pg_bindir=3D'/usr/pgs= ql-15/bin'
service_start_command =3D 'sudo systemctl start postg= resql-15'
service_stop_command =C2=A0=3D 'sudo systemctl stop po= stgresql-15'
<<<<<

>>>>>
nod= e_id=3D2 =C2=A0# Use 2 on standby
node_name=3D'standby'
conni= nfo=3D'host=3Dcentos803 user=3Drepmgr dbname=3Drepmgr password=3Dxxx co= nnect_timeout=3D15'
use_primary_conninfo_password=3Dtrue
data_dir= ectory=3D'/var/lib/pgsql/15/data' =C2=A0# Adjust for your setup
= pg_bindir=3D'/usr/pgsql-15/bin'
service_start_command =3D 's= udo systemctl start postgresql-15'
service_stop_command =C2=A0=3D &#= 39;sudo systemctl stop postgresql-15'
<<<<<

Re= gards,
Chris
--00000000000035fffc06401d5e58--