From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Strange issue with NFS mounted PGDATA on ugreen NAS |
Date: | 2024-12-31 23:26:28 |
Message-ID: | 1516c5ba81e2aac6fdaf146726d2e83d@lerctr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/31/2024 5:24 pm, Thomas Munro wrote:
> On Wed, Jan 1, 2025 at 11:44 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Larry Rosenman <ler(at)lerctr(dot)org> 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.
>
>> What it looks like is that readdir() is skipping over some files,
>> which would almost certainly be an NFS server bug. But that
>> theory could be wrong.
>
> Hmm. So in 15 and earlier, rmtree() would read all the file names
> into memory and then unlink them, but 54e72b66 changed that and
> started unlinking in the loop. Perhaps that wasn't a great idea, but
> it's hardly the only place that directory contents might change across
> readdir() calls (it's just a place that does that itself).
>
> As has been analysed by the pgbackrest guys, readdir() can be flaky
> over changing directories on some NFS (and maybe other network FSs)
> implementations (unresolved AFAIK and different from this problem,
> they were missing files during backups due to concurrent changes).
> 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 looked into this quite a bit when that last discussion
> happened, it's a mess). I wonder what a UGreen NAS is running.
UGreen is running a (modified) Debian Bookworm Linux.
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: ler(at)lerctr(dot)org
US Mail: 13425 Ranch Road 620 N, Apt 718, Austin, TX 78717-1010
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-12-31 23:37:56 | Re: Strange issue with NFS mounted PGDATA on ugreen NAS |
Previous Message | Thomas Munro | 2024-12-31 23:24:10 | Re: Strange issue with NFS mounted PGDATA on ugreen NAS |