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: Thomas Munro <thomas.munro@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>, Julien Rouhaud <rjuju123@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-07-21T11:25:05Z
Lists: pgsql-hackers
On 2022-Jul-21, Alvaro Herrera wrote:

> Yeah, I think that would reduce cruft.  I'm not sure this is more
> against backpatching policy or less, compared to adding a separate
> GUC just for this bugfix.

cruft:

    {
        {"allow_recovery_tablespaces", PG_POSTMASTER, WAL_RECOVERY,
            gettext_noop("Continues recovery after finding invalid database directories."),
            gettext_noop("It is possible for tablespace drop to interfere with database creation "
                         "so that WAL replay is forced to create fake database directories. "
                         "These should have been dropped by the time recovery ends; "
                         "but in case they aren't, this option lets recovery continue if they "
                         "are present.  Note that these directories must be removed manually afterwards."),
            GUC_NOT_IN_SAMPLE
        },
        &allow_recovery_tablespaces,
        false,
        NULL, NULL, NULL
    },

This is not a very good explanation, but I don't know how to make it
better.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"I think my standards have lowered enough that now I think 'good design'
is when the page doesn't irritate the living f*ck out of me." (JWZ)



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.