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

P <apraveen@pivotal.io>

From: Asim R P <apraveen@pivotal.io>
To: Paul Guo <pguo@pivotal.io>, Anastasia Lubennikova <a.lubennikova@postgrespro.ru>, Alexandra Wang <leiwang@pivotal.io>
Cc: Thomas Munro <thomas.munro@gmail.com>, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2019-09-20T12:23:56Z
Lists: pgsql-hackers

Attachments

On Thu, Sep 19, 2019 at 5:29 PM Asim R P <apraveen@pivotal.io> wrote:
>
> In order to fix the test failures, we need to distinguish between a
missing database directory and a missing tablespace directory.  And also
add logic to forget missing directories during tablespace drop.  I am
working on it.

Please find attached a solution that builds on what Paul has propose.  A
hash table, similar to the invalid page hash table is used to track missing
directory references.  A missing directory may be a tablespace or a
database, based on whether the tablespace is found missing or the source
database is found missing.  The crash recovery succeeds if the hash table
is empty at the end.

Asim

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.