Re: Fwd: Re: A new look at old NFS readdir() problems? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fwd: Re: A new look at old NFS readdir() problems?
Date
Msg-id 1299368.1736174962@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fwd: Re: A new look at old NFS readdir() problems?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: initdb -c "track_commit_timestamp=on" crashes in case of debug build
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_attribute_noreturn(), MSVC, C11