Re: pg_basebackup: errors on macOS on directories with ".DS_Store" files
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
Tobias Bussmann <t.bussmann@gmx.net>,
Tom Lane <tgl@sss.pgh.pa.us>,
Mark Guertin <markguertin@gmail.com>,
pgsql-bugs@lists.postgresql.org
Date: 2023-04-28T12:01:47Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Skip .DS_Store files in server side utils
- d3fdfdcd1c7f 13.15 landed
- c1fc502f595b 17.0 landed
- aeee173d2292 14.12 landed
- 76bb6dd2e56c 12.19 landed
- 29f00523808a 15.7 landed
- 103235888d9e 16.3 landed
Attachments
- skip_hidden_files_v5.diff (application/octet-stream) patch v5
> On 28 Apr 2023, at 07:32, Michael Paquier <michael@paquier.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: > https://www.postgresql.org/message-id/CAB7nPqSNFm2Lz6jASj1RGvAdod1W8ZmHfvML3M7gDnBQ3x6QMw@mail.gmail.com > > 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