On Wed, Jul 17, 2019 at 09:51:48AM -0400, Tom Lane wrote: > r.zhar...@postgrespro.ru writes: >> On Windows systems we cannot handle ERROR_DELETE_PENDING because >> GetLastError() returns ERROR_ACCESS_DENIED instead. >> So we rename the lock files before delete them. > > This seems improbably broken/stupid. Also, I've not seen any buildfarm > failures that would match this; it's always pg_ctl complaining not the > postmaster.
Oh, it is. A lot. And this has been discussed a couple of times across multiple threads on -bugs and/or -hackers. I think that Windows just lacks a way to detect reliably if a file is pending for deletion or not, and there is no way that we are going to enforce blindly a ERROR_DELETE_PENDING when we see EACCES. One code path which is impacted by that is our wrapper for stat() for the win32 port... For now I'd rather believe that what the OS tells us is true, in which case here it is plain wrong, but well. -- Michael
signature.asc
Description: PGP signature