Re: Race condition in recovery?

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: robertmhaas@gmail.com
Cc: tgl@sss.pgh.pa.us, dilipbalaut@gmail.com, hlinnaka@iki.fi, pgsql-hackers@lists.postgresql.org
Date: 2021-06-11T01:40:36Z
Lists: pgsql-hackers
At Thu, 10 Jun 2021 09:56:51 -0400, Robert Haas <robertmhaas@gmail.com> wrote in 
> On Wed, Jun 9, 2021 at 9:12 PM Kyotaro Horiguchi
> <horikyota.ntt@gmail.com> wrote:
> > https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=conchuela&dt=2021-06-09%2021%3A12%3A25&stg=recovery-check
> >
> > > ==~_~===-=-===~_~== pgsql.build/src/test/recovery/tmp_check/log/025_stuck_on_old_timeline_cascade.log ==~_~===-=-===~_~==
> > ....
> > > 2021-06-09 23:31:10.439 CEST [893820:1] LOG:  started streaming WAL from primary at 0/2000000 on timeline 1
> > > 2021-06-09 23:31:10.439 CEST [893820:2] FATAL:  could not receive data from WAL stream: ERROR:  requested WAL segment 000000010000000000000002 has already been removed
> >
> > The script 025_stuck_on_olde_timeline.pl (and I) forgets to set
> > wal_keep_size(segments).
> 
> Thanks for the analysis and the patches. I have committed them.

Thanks for committing it.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. Further refinement of stuck_on_old_timeline recovery test

  2. Adjust new test case to set wal_keep_segments.

  3. Adjust new test case to set wal_keep_size.

  4. Fix corner case failure of new standby to follow new primary.

  5. Back-port a few PostgresNode.pm methods.

  6. Allow PostgresNode.pm's backup method to accept backup_options.

  7. Add end-to-end testing of pg_basebackup's tar-format output.

  8. Allow PostgresNode.pm tests to wait for catchup

  9. Delay reading timeline history file until it's fetched from master.