pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Michael Paquier <michael@paquier.xyz>
To: Fujii Masao <fujii@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Ensure that a standby is able to follow a primary on a newer tim
Date: Thu, 14 Jan 2021 14:14:11 +0900
Message-ID: <c00a1800-e201-aaff-432a-74d82668852c@oss.nttdata.com> (raw)
In-Reply-To: <X//PsenxcC50jDzX@paquier.xyz>
References: <E1kztNU-0003Cj-Hm@gemulon.postgresql.org>
	<X//PsenxcC50jDzX@paquier.xyz>



On 2021/01/14 13:59, Michael Paquier wrote:
> Hi Fujii-san,
> 
> On Thu, Jan 14, 2021 at 03:32:52AM +0000, Fujii Masao wrote:
>> Ensure that a standby is able to follow a primary on a newer timeline.
>>
>> Commit 709d003fbd refactored WAL-reading code, but accidentally caused
>> WalSndSegmentOpen() to fail to follow a timeline switch while reading from
>> a historic timeline. This issue caused a standby to fail to follow a primary
>> on a newer timeline when WAL archiving is enabled.
> 
> florican is telling that this test has some stability problems:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=florican&dt=2021-01-14%2003%3A55%3A45
> 
> Here I can see that replication keeps asking for a segment that's
> already gone:
> 2021-01-13 23:34:52.104 EST [64611:1] LOG:  started streaming WAL from
> primary at 0/3000000 on timeline 1
> 2021-01-13 23:34:52.104 EST [64611:2] FATAL:  could not receive data
> from WAL stream: ERROR:  requested WAL segment
> 000000010000000000000003 has already been removed

Thanks for reporting this! I'm looking at this issue.

My guess is that the requested WAL file was removed unfortunately by
checkpoint because no replication slot is used and wal_keep_size is not set.
So easy fix is to set wal_keep_size to 512MB or other in that test. Thought?

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION





view thread (7+ messages)  latest in thread

Message-ID: <c00a1800-e201-aaff-432a-74d82668852c@oss.nttdata.com>
Permalink:  ../c00a1800-e201-aaff-432a-74d82668852c@oss.nttdata.com/
Also on:    postgresql.org/message-id/c00a1800-e201-aaff-432a-74d82668852c@oss.nttdata.com

 · 

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-committers@postgresql.org
  Cc: masao.fujii@oss.nttdata.com, michael@paquier.xyz, fujii@postgresql.org
  Subject: Re: pgsql: Ensure that a standby is able to follow a primary on a newer tim
  In-Reply-To: <c00a1800-e201-aaff-432a-74d82668852c@oss.nttdata.com>
  References: <E1kztNU-0003Cj-Hm@gemulon.postgresql.org> <X//PsenxcC50jDzX@paquier.xyz> <c00a1800-e201-aaff-432a-74d82668852c@oss.nttdata.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