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: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Tobias Bussmann <t(dot)bussmann(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-28 12:01:47
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

> On 28 Apr 2023, at 07:32, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> On Thu, Apr 27, 2023 at 04:22:08PM +0200, Daniel Gustafsson wrote:

>> The commit message for 6ad8ac60262 doesn't explain why pgsql_tmp was left out
>> of the excludeFiles table, but my guess is that it's either an optimization or
>> a deliberate choice to not DEBUG1 log skipping temporary files. I didn't go
>> digging in the archives to find the corresponding thread but there might be
>> clues to be had there.
> FWIW, here is the thread:
> I think that you're right, the idea is to avoid the random noise
> caused by these temp files and their names. This elog has been useful
> for debugging in the past for the fixed entries, at least for me.

Aha, thanks for the digging!

> While on it, it strikes me that we should have a check on
> PG_TEMP_FILES_DIR in basebackup.c's sendDir()? Okay, that's the same
> as PG_TEMP_FILE_PREFIX, but pg_checksums and pg_rewind check for
> *both* patterns so that feels inconsistent to me. This should not be
> in excludeDirContents, because we don't want an empty folder in this
> case.

That makes sense, even though it's a bit duplicative as it stands in core
today. Given that these *can* be different at some point in the future (or in
a fork), we should check both of course. Attached v5 does that as well as
incorporates a version of the doc change proposed in v4 upthread.

Daniel Gustafsson

Attachment Content-Type Size
skip_hidden_files_v5.diff application/octet-stream 6.8 KB

In response to


Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2023-04-28 12:06:45 Re: pg_basebackup: errors on macOS on directories with ".DS_Store" files
Previous Message PG Bug reporting form 2023-04-28 11:00:01 BUG #17912: Invalid memory access when converting plpython' array containing empty array