On Sun, Aug 22, 2021 at 6:59 PM Noah Misch <n...@leadboat.com> wrote: > Here's what I plan to push. Besides adding a test, I modified things so > CREATE TABLESPACE redo continues to report an error if a non-directory exists > under the name we seek to create. One could argue against covering that > corner case, but TablespaceCreateDbspace() does cover it.
By and large, LGTM, though perhaps it would be appropriate to also credit me as the reporter of the issue. I feel it might be slightly better to highlight somewhere, either in the commit message or in the comments, that removing the old directory is unsafe, because if wal_level=minimal, we may have no other copy of the data. For me that's the key point here. I feel that the commit message and comments inside the patch explain rather thoroughly the possible consequences of the bug and why this particular fix was chosen, but they're not real explicit about why there was a bug at all. Thanks very much for working on this. -- Robert Haas EDB: http://www.enterprisedb.com