Re: standby recovery fails (tablespace related) (tentative patch and discussion)

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: thomas.munro@gmail.com, tgl@sss.pgh.pa.us, boekewurm+postgres@gmail.com, pgsql-hackers@postgresql.org
Date: 2022-07-29T10:59:03Z
Lists: pgsql-hackers
On 2022-Jul-29, Kyotaro Horiguchi wrote:

> At Fri, 29 Jul 2022 11:27:01 +1200, Thomas Munro <thomas.munro@gmail.com> wrote in 
> > Maybe it just needs a replication slot?  I see:
> > 
> > ERROR:  requested WAL segment 000000010000000000000003 has already been removed
> 
> Agreed, I see the same.  The same failure can be surely reproducible
> by inserting wal-switch+checkpoint after taking backup [1].  And it is
> fixed by the attached.

WFM, pushed that way.  I added a slot drop after the pg_stat_replication
count check to be a little less intrusive. Thanks Matthias for
reporting.  (Note that the Cirrus page has a download link for the
complete logs as artifacts).

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"I'm always right, but sometimes I'm more right than other times."
                                                  (Linus Torvalds)



Commits

  1. Improve recently-added test reliability

  2. Fix new recovery test for log_error_verbosity=verbose case

  3. Fix test instability

  4. Fix replay of create database records on standby

  5. Allow "in place" tablespaces.

  6. Fix get_dirent_type() for Windows junction points.

  7. Revert "Fix replay of create database records on standby"

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

  9. Make DROP DATABASE command generate less WAL records.

  10. Consolidate methods for translating a Perl path to a Windows path.