Re: Fwd: Re: A new look at old NFS readdir() problems?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Larry Rosenman <ler(at)lerctr(dot)org>, Pgsql hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fwd: Re: A new look at old NFS readdir() problems?
Date: 2025-01-06 14:49:22
Message-ID: 1299368.1736174962@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-01-06 14:52:15 Re: pg_attribute_noreturn(), MSVC, C11
Previous Message Peter Eisentraut 2025-01-06 14:41:54 Re: initdb -c "track_commit_timestamp=on" crashes in case of debug build