On Thu, Jan 5, 2023 at 1:06 AM vignesh C <vignes...@gmail.com> wrote: > On Tue, 25 Oct 2022 at 09:42, Thomas Munro <thomas.mu...@gmail.com> wrote: > > I pushed the bug fixes from this series, without their accompanying > > tests. Here's a rebase of the test suite, with all those tests now > > squashed into the main test patch, and also the > > tell-Windows-to-be-more-like-Unix patch. Registered in the > > commitfest. > > The patch does not apply ...
I think this exercise was (if I say so myself) quite useful, to understand the Windows file system landscape. Maybe the things we figured out by testing are common knowledge to real Windows programmers, I dunno, but they were certainly all news to me and not documented anywhere I could find, and the knowledge and tests will probably help in future battles against Windows. The most important things discovered were: 1. If you're testing on a Windows VM or laptop running 10 or 11 *you aren't seeing the same behaviour as Windows Server*. So the semantics don't match real production PostgreSQL deployments. 2. If we decided to turn on the new POSIX unlink semantics explicitly as originally proposed by Victor, we'd get the behaviour we really want on NTFS on all known Windows versions. But that would move the traditional behaviour into a blind spot that we have no testing for: ReFS and SMB. Our tree would probably gain more stuff that doesn't work on them, so that would be tantamount to dropping support. Therefore, with regret, I'm going to withdraw this for now. We'd need to get CI testing for ReFS and/or SMB first, which could be arranged, but even then, what is the point of POSIX semantics if you don't have them everywhere? You can't even remove any code! Unless we could reach consensus that "PostgreSQL is not supported on SMB or ReFS until they gain POSIX semantics" [which may never happen for all we know], and then commit this patch and forget about non-POSIX unlink semantics forever. I don't see us doing that in a hurry. So there's not much hope for this idea in this commitfest. The little C TAP framework could definitely be useful as a starting point for something else, and the FS semantics test will definitely come in handy if this topic is reopened by some of those potential actions or needed to debug existing behaviour, and then I might even re-propose parts of it, but it's all here in the archives anyway.