Re: standby recovery fails (tablespace related) (tentative patch and discussion) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Date
Msg-id 20220714214740.drhmvdx2aseqgvvb@alvherre.pgsql
Whole thread Raw
In response to Re: standby recovery fails (tablespace related) (tentative patch and discussion)  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Re: standby recovery fails (tablespace related) (tentative patch and discussion)
List pgsql-hackers
Here's a couple of fixups.  0001 is the same as before.  In 0002 I think
CheckTablespaceDirectory ends up easier to read if we split out the test
for validity of the link.  Looking at that again, I think we don't need
to piggyback on ignore_invalid_pages, which is already a stretch, so
let's not -- instead we can use allow_in_place_tablespaces if users need
a workaround.  So that's 0003 (this bit needs more than zero docs,
however.)

0004 is straightforward: let's check for bad directories before logging
about consistent state.

After all this, I'm not sure what to think of dbase_redo.  At line 3102,
is the directory supposed to exist or not?  I'm confused as to what is
the expected state at that point.  I rewrote this, but now I think my
rewrite continues to be confusing, so I'll have to think more about it.

Another aspect are the tests.  Robert described a scenario where the
previously committed version of this patch created trouble.  Do we have
a test case to cover that problematic case?  I think we should strive to
cover it, if possible.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"The eagle never lost so much time, as
when he submitted to learn of the crow." (William Blake)

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: doc: Clarify Routines and Extension Membership
Next
From: Nathan Bossart
Date:
Subject: Re: pg_parameter_aclcheck() and trusted extensions