Robert Haas <robertmhaas@gmail.com> writes:
> Yeah, that seems like very strong evidence against FreeBSD, but I
> think Thomas Munro's point about CIFS is worth considering. That is
> rather widely used, and if the same workarounds would help both that
> and FreeBSD's NFS, we might want to adopt it even if it's not a
> complete fix.
TBH, I am happy that PG is now failing in a fairly visible way on
filesystems that are broken in this fashion. I think that is better
than silent data corruption in obscure circumstances, which is where
we were before and would be again if we band-aid rmtree() and do
nothing else. Nor do I think it's worth the effort to try to become
fully bulletproof on the point.
I think we should document that CIFS is unsupported. The docs
could say something like:
Storing databases on filesystems with unreliable readdir() is
not supported and can lead to data corruption. If you observe
warnings like "directory is not empty" when trying to drop a
database, that is strong evidence that the filesystem has
unreliable readdir(). Filesystems known to have this problem
include NFS on FreeBSD and CIFS on all platforms.
We could s/FreeBSD/older FreeBSD/ if something comes of Thomas'
efforts to fix that situation.
regards, tom lane