pgsql: Skip .DS_Store files in server side utils

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Skip .DS_Store files in server side utils
Date: 2024-02-13 12:57:48
Message-ID: E1rZsM8-0060Y7-C7@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Skip .DS_Store files in server side utils

The macOS Finder application creates .DS_Store files in directories
when opened, which creates problems for serverside utilities which
expect all files to be PostgreSQL specific files. Skip these files
when encountered in pg_checksums, pg_rewind and pg_basebackup.

This was extracted from a larger patchset for skipping hidden files
and system files, where the concencus was to just skip these. Since
this is equally likely to happen in every version, backpatch to all
supported versions.

Reported-by: Mark Guertin <markguertin(at)gmail(dot)com>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Reviewed-by: Tobias Bussmann <t(dot)bussmann(at)gmx(dot)net>
Discussion: https://postgr.es/m/E258CE50-AB0E-455D-8AAD-BB4FE8F882FB@gmail.com
Backpatch-through: v12

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/aeee173d229232f94acc61e7bfe81d40f56e478e

Modified Files
--------------
doc/src/sgml/protocol.sgml | 2 +-
doc/src/sgml/ref/pg_basebackup.sgml | 3 ++-
doc/src/sgml/ref/pg_rewind.sgml | 5 +++--
src/backend/replication/basebackup.c | 4 ++++
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 16 ++++++++++++++++
src/bin/pg_checksums/pg_checksums.c | 4 ++++
src/bin/pg_checksums/t/002_actions.pl | 7 +++++++
src/bin/pg_rewind/filemap.c | 4 ++++
src/bin/pg_rewind/t/003_extrafiles.pl | 5 +++++
9 files changed, 46 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-02-13 12:58:06 pgsql: Skip .DS_Store files in server side utils
Previous Message Daniel Gustafsson 2024-02-13 12:57:24 pgsql: Skip .DS_Store files in server side utils