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 1v428B-007P1y-Lt for pgsql-admin@arkaria.postgresql.org; Wed, 01 Oct 2025 19:04:51 +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 1v4288-004p1r-PM for pgsql-admin@arkaria.postgresql.org; Wed, 01 Oct 2025 19:04:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v4288-004p1j-CV for pgsql-admin@lists.postgresql.org; Wed, 01 Oct 2025 19:04:49 +0000 Received: from mail-yx1-xb12e.google.com ([2607:f8b0:4864:20::b12e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v4286-0018IK-2b for pgsql-admin@postgresql.org; Wed, 01 Oct 2025 19:04:48 +0000 Received: by mail-yx1-xb12e.google.com with SMTP id 956f58d0204a3-63470a6f339so353691d50.0 for ; Wed, 01 Oct 2025 12:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759345484; x=1759950284; 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=D4gcmTzOXrSZd7PKz6xaPakXqhl4vCb97VzFhXLQMAI=; b=m/EUtxpGxdh2ZAQVeJq5a4LeQ9v4ZKKjsBajJcaiUuSOtOvp0Lg/EnROrAHJk4EYSt b4Tw0Zy+xkcpyS9x9PuBWzo5BmzSC3pDOurh1VzhPgn5NRkC4LKlqR1dIt8qp8XJkqds zcSnO9ZEpqpBJ7GsBI70fWaLoZvu9F7NZ4uR1dfdZvSQhlKvJ6raXRdwuIjIh0D59wL0 Jgk2ZxoSNtXzb0pnUzPvpXv/rYtOKCTVm4Ad6X+/uDYjPx/j7QP42xjyKGvmdCrWeUHr rBT2XhtcG7Bg6nBiWBL+UsYX9G0li1ze+LbA5FJaGDj4GbDbUYTqbCwB2ba4JZuJz1IA IM4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759345484; x=1759950284; 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=D4gcmTzOXrSZd7PKz6xaPakXqhl4vCb97VzFhXLQMAI=; b=c70GrMJF5TbgbloCBzbY4x+ZsrzD/qWoLKifQy6fY456mXj9Urz7w3tz4U1g5apg/C yzhDs3aXUXqBaShPxrt4zKqi5zRLbixsxEpXYVIyBOarFB5EpD/sMMdpVqrTxDl6zlvf +wL7ZiU+UonjPNOxDQ3KLKzDUqj9ZVEXjqh6bBq7BxzKHu8SX5im9xldm0Tc4v/gtdEa SAz2ejj+LxytD/L1iGLRMCkFN4DrTzZdwBLcbJvG5yxegKdzU3CcczGnbDnSx5Cizsp2 3kxtrJNzECePuGFgM3kO2qHen6vOPJv589emv3ZnramMeQ3fVcU1bUNksEmK/PGNrNJb RoOA== X-Forwarded-Encrypted: i=1; AJvYcCXI9mTubnr49GaXECgwywCPtQU0782gV0EpNafGS2x8s019kWLIXOHHV5QziM2GsoDkbmM7LPuuNVEdiw==@postgresql.org X-Gm-Message-State: AOJu0Yy2vV+kAbJN3xki32eGNdPsUj6sioPlzTaEsR+Cn8IV0uuWM/Xs ZsDCjFgF2boV2hCGTA8rwI0wW+cwp1ugt6ae5p1GPQiCW4sooUknQfi2FwvPm2WFVc18opyATFo W+P/Bc0qc5ZZiQCu8HaHeuk3n+v7Sd0JwG7zQqbJ8rb7Cz9E= X-Gm-Gg: ASbGncsyImT2JdCgFor+DNEXw1QwMb3xsUCkePsHLRPKBh6qeTMdyXc0Lvtl/hoj/e/ +ySTZVblAx0YCn6MlS3JjmcP3tRj/knDK06hBJr1cw05OJ+Gd7/sRLCk88yytEFH5o30AG8k9hp 8f3+28sPzaUHMY3jLchQivTm1g8yWdFiviRLhZN8IcITkXodvAy69P1KEAcHXw/Yt3cazT+Fl26 MjdlQEGOodaY20MDLyt0+9KKtrLzFw= X-Google-Smtp-Source: AGHT+IEB0xwrKhANz83/0kxv1Fn+8VjkL4eOVINXEttdhYKACgz5ua0aw6qguwpNXBJCE/4SdE/Ihwg0KWylKBDFiug= X-Received: by 2002:a53:8403:0:b0:632:3cc7:c8cd with SMTP id 956f58d0204a3-63b6fef6ae4mr4722458d50.23.1759345484340; Wed, 01 Oct 2025 12:04:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tayyab Fayyaz Date: Wed, 1 Oct 2025 12:03:36 -0700 X-Gm-Features: AS18NWCka9dGKxUnkRAa1E92eEtQbi6qB3sw-4gkrFhTLRMPp4XheGaMPFXCbLo Message-ID: Subject: Re: repmgr cannot bring up the standby database after switchover manaully To: Fernando Hevia Cc: Chris Lee , Imran Khan , pgsql-admin Content-Type: multipart/alternative; boundary="000000000000a1a52606401d8a78" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a1a52606401d8a78 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Fernando, In my recent experience, there was no issue starting the old primary=E2=80= =94it came up normally. However, it resulted in a split-brain situation where the old primary continued to accept both read and write operations while still assuming the other two nodes were replicas. This issue occurred with the following environment: - *OS version:* RHEL 8.10 - *Postgres DB version:* 14.9 - *repmgr version:* 5.5.0 Tayyab On Wed, Oct 1, 2025 at 11:52=E2=80=AFAM Fernando Hevia w= rote: > > 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. Fo= r >> 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@gma= il.com) > escribi=C3=B3: > >> Hi Tayyab, >> >> Thanks for your information . I also want to find out whether that is th= e >> 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 issu= e >>> 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 t= o >>>> 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, wro= te: >>>> >>>>> Hi all, >>>>> >>>>> I have 2 postgresql servers. One is the primary and another one is th= e >>>>> 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 br= ing 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= =3Dxxx >>>>> 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= =3Dxxx >>>>> 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 >>>>> >>>> --000000000000a1a52606401d8a78 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello=C2=A0Fernando,

<= p>In my recent experience, there was no issue starting the old primary=E2= =80=94it came up normally. However, it resulted in a split-brain situation = where the old primary continued to accept both read and write operations wh= ile still assuming the other two nodes were replicas.

This issue occurred with the following environment:

  • OS version: RHEL 8.10

  • Postgres DB version: 14.9

  • repmgr version: 5.5.0

Tayyab

On Wed, Oct 1, 2025 at 11:52=E2=80=AFAM Fernando H= evia <fhevia@gmail.com> wrote= :

I have 2 postgresq= l servers. One is the primary and another one is the standby. I am trying t= o setup repmgr to do the switchover manually. Passwordless ssh have been se= tup for postgres ID on both servers.

I use this command "repmgr= standby switchover --log-level=3DDEBUG --verbose". The standy databas= e 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.=C2=A0=C2= =A0

In a switchover the primary server is s= hutdown 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 behavio= r for a switchover command.

Have you checked the P= ostgres log file for the previous primary? You should find the startup fail= ure cause in the log.

Regards,
Fernando<= /div>

=C2=A0

<= div dir=3D"ltr" class=3D"gmail_attr">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,
<= br>
Thanks for your information . I also want to fin= d out whether that is the default behavior,=C2=A0 or I am not configuring r= epmgr correctly.

Regards= ,
Chris

On Wed, 1 Oct 2025, 18:12 Imran Khan, &= lt;imran.k.23@gma= il.com> wrote:
Hi Tayyab,

=C2=A0Is this a default behavior? We have 4 nodes cluster but never ha= d issue in switchovers.=C2=A0

Thanks,=C2=A0
Imran

On Wed, Oct 1, 2025,= 1:10=E2=80=AFPM Tayyab Fayyaz <tayyab.humayl@gmail.com> wro= te:
Hello Chris,

I face= d this issue it will not add automatically as standby you have to add it ma= nually.

But I wrote a sc= ript 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, <clee.hk@gmail.com> w= rote:
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 switchov= er manually. Passwordless ssh have been setup for postgres ID on both serve= rs.

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 abl= e to bring up as standby by repmgr. =C2=A0

Does anyone encounter thi= s issue before? Thanks a lot for any suggestions.

Here is my OS and = DB versions:

OS version: CentOS Stream release 8
Postgres DB vers= ion: =C2=A015.12
rempmgr version: 5.5.0

Here is the repmgr conf f= iles:
>>>>>
node_id=3D1 =C2=A0# Use 2 on standby
no= de_name=3D'primary'
conninfo=3D'host=3Dcentos804 user=3Drepm= gr dbname=3Drepmgr password=3Dxxx connect_timeout=3D15'
use_primary_= conninfo_password=3Dtrue
data_directory=3D'/var/lib/pgsql/15/data= 9; =C2=A0# Adjust for your setup
pg_bindir=3D'/usr/pgsql-15/bin'=
service_start_command =3D 'sudo systemctl start postgresql-15'<= br>service_stop_command =C2=A0=3D 'sudo systemctl stop postgresql-15= 9;
<<<<<

>>>>>
node_id=3D2 =C2= =A0# Use 2 on standby
node_name=3D'standby'
conninfo=3D'h= ost=3Dcentos803 user=3Drepmgr dbname=3Drepmgr password=3Dxxx connect_timeou= t=3D15'
use_primary_conninfo_password=3Dtrue
data_directory=3D= 9;/var/lib/pgsql/15/data' =C2=A0# Adjust for your setup
pg_bindir=3D= '/usr/pgsql-15/bin'
service_start_command =3D 'sudo systemct= l start postgresql-15'
service_stop_command =C2=A0=3D 'sudo syst= emctl stop postgresql-15'
<<<<<

Regards,
Ch= ris
--000000000000a1a52606401d8a78--