pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Vijaykumar Patil <vijaykumar.patil@maersk.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: General support on postgres replication
Date: Thu, 23 Nov 2023 12:53:48 +0100
Message-ID: <9aa59acdaf3a785db3a7359aba923bc0e7badfe2.camel@cybertec.at> (raw)
In-Reply-To: <AMAP107MB0469AA2C3813C4F26B3763CEF5B9A@AMAP107MB0469.EURP107.PROD.OUTLOOK.COM>
References: <AMAP107MB0469F60A8FD4B12B68281E8BF5BAA@AMAP107MB0469.EURP107.PROD.OUTLOOK.COM>
	<5f0a9def7fddf4cfca1d6ea2af141da633b97d37.camel@cybertec.at>
	<AMAP107MB0469AA2C3813C4F26B3763CEF5B9A@AMAP107MB0469.EURP107.PROD.OUTLOOK.COM>

On Thu, 2023-11-23 at 09:32 +0000, Vijaykumar Patil wrote:
> LOG:  entering standby mode
> LOG:  consistent recovery state reached at 1/27000100
> LOG:  database system is ready to accept read-only connections
> LOG:  started streaming WAL from primary at 1/28000000 on timeline 36
> LOG:  recovery stopping before commit of transaction 25628, time 2023-11-22 04:33:31.454379-05
> LOG:  redo done at 1/2800BBB0 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 43.73 s
> FATAL:  terminating walreceiver process due to administrator command
> LOG:  selected new timeline ID: 37
> LOG:  archive recovery complete

When you built your standby, you accidentally set (or copied via pg_basebackup)
an option "recovery_target_*", so recovery stopped at that point, and the standby
server was promoted.

Don't set any of these parameters on the standby server.

This is certainly one of the major problems introduced by commit 2dedf4d9a8:
If you ever recovered a database, you may end up having recovery parameters
set in your configuration file.  You don't notice them until you build a
standby server, which will then get into trouble.

Yours,
Laurenz Albe





view thread (5+ messages)

Message-ID: <9aa59acdaf3a785db3a7359aba923bc0e7badfe2.camel@cybertec.at>
Permalink:  ../9aa59acdaf3a785db3a7359aba923bc0e7badfe2.camel@cybertec.at/
Also on:    postgresql.org/message-id/9aa59acdaf3a785db3a7359aba923bc0e7badfe2.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, vijaykumar.patil@maersk.com
  Subject: Re: General support on postgres replication
  In-Reply-To: <9aa59acdaf3a785db3a7359aba923bc0e7badfe2.camel@cybertec.at>
  References: <AMAP107MB0469F60A8FD4B12B68281E8BF5BAA@AMAP107MB0469.EURP107.PROD.OUTLOOK.COM> <5f0a9def7fddf4cfca1d6ea2af141da633b97d37.camel@cybertec.at> <AMAP107MB0469AA2C3813C4F26B3763CEF5B9A@AMAP107MB0469.EURP107.PROD.OUTLOOK.COM> <9aa59acdaf3a785db3a7359aba923bc0e7badfe2.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox