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

Tobias Bussmann <t.bussmann@gmx.net>

From: Tobias Bussmann <t.bussmann@gmx.net>
To: Michael Paquier <michael@paquier.xyz>
Cc: Daniel Gustafsson <daniel@yesql.se>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Mark Guertin <markguertin@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2023-05-01T21:23:58Z
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 →
  1. Skip .DS_Store files in server side utils

>> [...] is a new feature and not a bugfix [...] other opinions [...]
> I am fine to hear more opinions, then.

IMHO, while generally ignoring hidden files can be seen as a change in behaviour and a new feature, specifically skipping the '.DS_Store' files is clearly a bugfix that should be backported. With checksumming enabled, pg_basebackup is simply broken on macOS, depending on whether or not you have ever browsed parts of the data directory in the Finder.

The safe solution for the back branches would be to add '{".DS_Store", false}' to the exclude_list_item arrays in backend/backup/basebackup.c, bin/pg_checksums/pg_checksums.c and bin/pg_rewind/filemap.c, but I can't judge whether this would justify using a different codepath for the older versions or not.

--
Tobias Bussmann