Re: Skip .DS_Store files in check_mode_recursive

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andrei Lepikhov <lepihov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: dgustafsson(at)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Skip .DS_Store files in check_mode_recursive
Date: 2026-07-28 11:56:41
Message-ID: 707c55fd-86fc-47ce-875d-3409fd70a16f@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-07-28 Tu 4:53 AM, Andrei Lepikhov wrote:
> Hi,
>
> I am repeatedly encountering an annoying failing test during 'make check-world'
> execution on the macOS platform: pg_resetwal with the result:
>
> Failed test 'check PGDATA permissions'
>
> It happens because a filesystem object .DS_Store exists in the directory.
> AFAIK, MacOS manages it on its own. Given that I almost never touch this module,
> it seems the OS handles it automatically.
>
> A quick dive into the mailing list history shows that this problem has been
> discovered [1] and partly fixed [2] before.
>
> It looks like this approach might be extended to TAP tests too. In the
> attachment, see the sketch of the code and a minor test to prove that it works.
>
>
> [1] pg_basebackup: errors on macOS on directories with ".DS_Store" files
> https://www.postgresql.org/message-id/flat/E258CE50-AB0E-455D-8AAD-BB4FE8F882FB%40gmail.com
> [2] Commit d3fdfdcd1c7 'Skip .DS_Store files in server side utils'

Minor perl nit:

I don't think you need to say

    return if basename($File::Find::name) eq '.DS_Store';

you can just say

    return if $_ eq '.DS_Store';

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-07-28 12:21:11 Re: sequencesync worker race with REFRESH SEQUENCES
Previous Message Hayato Kuroda (Fujitsu) 2026-07-28 10:44:50 RE: sequencesync worker race with REFRESH SEQUENCES