From: Euler Taveira <euler@eulerto.com>
To: mahadevan@rapidloop.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16879: Delayed standby does not connect to primary on startup
Date: Sun, 21 Feb 2021 21:06:27 -0300
Message-ID: <0f654d04-5d07-4e75-b995-d2271466f125@www.fastmail.com> (raw)
In-Reply-To: <16879-3673aa2e1562a38f@postgresql.org>
References: <16879-3673aa2e1562a38f@postgresql.org>
On Sun, Feb 21, 2021, at 6:39 AM, PG Bug reporting form wrote:
> We have a customer who reported pg_last_wal_receive_lsn() returning NULL on
> a delayed standby, and this is what the investigation led to.
This is not a bug. It is working as documented.
"If streaming replication is disabled, or if it has not yet started, the
function returns NULL." [1]
In this scenario, server was (re)started but it cannot streaming because of
recovery_min_apply_delay setting, hence, the pg_last_wal_receive_lsn() returns
NULL. When the standby applies the first transaction (after 1h), this function
will return a non-NULL value.
[1] https://www.postgresql.org/docs/13/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL
--
Euler Taveira
EDB https://www.enterprisedb.com/
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-bugs@postgresql.org
Cc: euler@eulerto.com, mahadevan@rapidloop.com
Subject: Re: BUG #16879: Delayed standby does not connect to primary on startup
In-Reply-To: <0f654d04-5d07-4e75-b995-d2271466f125@www.fastmail.com>
References: <16879-3673aa2e1562a38f@postgresql.org> <0f654d04-5d07-4e75-b995-d2271466f125@www.fastmail.com>
* 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