Re: pg_basebackup: errors on macOS on directories with ".DS_Store" files

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tobias Bussmann <t(dot)bussmann(at)gmx(dot)net>, Mark Guertin <markguertin(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: pg_basebackup: errors on macOS on directories with ".DS_Store" files
Date: 2023-04-20 08:50:27
Message-ID: 5781DAEE-66E2-41F5-BE03-E82C729F1340@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On 20 Apr 2023, at 02:15, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Wed, Apr 19, 2023 at 02:15:51PM -0400, Tom Lane wrote:
>> Yeah. I wonder if we ought to do something more general, and
>> ignore all files whose names start with ".".
>
> Indeed. I don't see any point is adding hidden files for the
> checksum, rewind and base backup lists, so we could just make it a
> hardcoded rule. That's currently what we do for configuration files
> when using include_dir for postgresql.conf (as well as hba and ident
> files in 16~).

The attached trivial diff skips hidden files for pg_basebackup and pg_checksums
as part of the checks already performed by these tools for skipping other
files. Skimming other callsites of ReadDir and readdir I didn't see any others
which could benefit from skipping hidden files.

--
Daniel Gustafsson

Attachment Content-Type Size
skip_hidden_files.diff application/octet-stream 1.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro Horiguchi 2023-04-20 08:58:14 Re: BUG #17903: There is a bug in the KeepLogSeg()
Previous Message Junwang Zhao 2023-04-20 07:40:14 Re: BUG #17903: There is a bug in the KeepLogSeg()