Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2025-01-02 Thread Tom Lane
I wrote: > I forgot to report back, but yesterday I spent time unsuccessfully > trying to reproduce the problem with macOS client and NFS server > using btrfs (a Synology NAS running some no-name version of Linux). Also, I *can* reproduce it using the same NFS server and a FreeBSD 14.2 client. At

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2025-01-02 Thread Tom Lane
Thomas Munro writes: > I now suspect this specific readdir() problem is in FreeBSD's NFS > client. See below. There have also been reports of missed files from > (IIRC) Linux clients without much analysis, but that doesn't seem too > actionable from here unless someone can come up with a repro o

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2025-01-02 Thread Thomas Munro
On Wed, Jan 1, 2025 at 6:39 PM Tom Lane wrote: > ISTM we used to disclaim responsibility for data integrity if you > try to put PGDATA on NFS. I looked at the current wording about > NFS in runtime.sgml and was frankly shocked at how optimistic it is. > Shouldn't we be saying something closer to

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2024-12-31 Thread Tom Lane
Thomas Munro writes: > NFS is at least supposed to tell the client that its cookie has been > invalidated with a cookie-invalidation-cookie called cookieverf. But > there isn't any specified way to recover. FreeBSD's client looks like > it might try to, but I'm not sure if that Linux's server ev

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2024-12-31 Thread Thomas Munro
On Wed, Jan 1, 2025 at 1:20 PM Kenneth Marshall wrote: > On Tue, Dec 31, 2024 at 06:58:14PM -0500, Tom Lane wrote: > > Larry Rosenman writes: > > > On 12/31/2024 5:37 pm, Tom Lane wrote: > > >> Do you know what its underlying file system is? > > > > > btrfs > Maybe there are some btrfs or nfs op

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2024-12-31 Thread Tom Lane
Larry Rosenman writes: > On 12/31/2024 5:37 pm, Tom Lane wrote: >> Do you know what its underlying file system is? > btrfs OK. My test was with XFS underneath the NFS service. regards, tom lane

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2024-12-31 Thread Larry Rosenman
On 12/31/2024 5:37 pm, Tom Lane wrote: Larry Rosenman writes: On 12/31/2024 5:24 pm, Thomas Munro wrote: The implementation-specific cookie scheme for encoding a sort of cursor position across readdir() calls has various different problems on various different OSes, NFS implementations and und

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2024-12-31 Thread Tom Lane
Larry Rosenman writes: > On 12/31/2024 5:24 pm, Thomas Munro wrote: >> The implementation-specific cookie scheme for encoding a sort of >> cursor position across readdir() calls has various different problems >> on various different OSes, NFS implementations and underlying local >> file systems (I

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2024-12-31 Thread Larry Rosenman
On 12/31/2024 5:24 pm, Thomas Munro wrote: On Wed, Jan 1, 2025 at 11:44 AM Tom Lane wrote: Larry Rosenman writes: > On 12/31/2024 12:22 pm, Larry Rosenman wrote: >> When I try to drop a database, PostgreSQL leaves files in the directory >> and does not even try to delete them. >> PostgreSQL 16

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2024-12-31 Thread Thomas Munro
On Wed, Jan 1, 2025 at 11:44 AM Tom Lane wrote: > Larry Rosenman writes: > > On 12/31/2024 12:22 pm, Larry Rosenman wrote: > >> When I try to drop a database, PostgreSQL leaves files in the directory > >> and does not even try to delete them. > >> PostgreSQL 16.6, FreeBSD 14.2, PGDATA mounted NFS

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2024-12-31 Thread Tom Lane
Larry Rosenman writes: > On 12/31/2024 12:22 pm, Larry Rosenman wrote: >> When I try to drop a database, PostgreSQL leaves files in the directory >> and does not even try to delete them. >> PostgreSQL 16.6, FreeBSD 14.2, PGDATA mounted NFS from UGreen NAS. FWIW, I couldn't reproduce such a probl

Re: Strange issue with NFS mounted PGDATA on ugreen NAS

2024-12-31 Thread Larry Rosenman
On 12/31/2024 12:22 pm, Larry Rosenman wrote: When I try to drop a database, PostgreSQL leaves files in the directory and does not even try to delete them. PostgreSQL 16.6, FreeBSD 14.2, PGDATA mounted NFS from UGreen NAS. Truss of the create/delete attached. It does NOT seem to happen PG < 1