Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppCLc-0004gA-40 for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Apr 2023 18:16:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ppCLa-00010q-Vk for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Apr 2023 18:16:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppCLa-00010h-NS for pgsql-bugs@lists.postgresql.org; Wed, 19 Apr 2023 18:16:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ppCLU-000jWB-0U for pgsql-bugs@lists.postgresql.org; Wed, 19 Apr 2023 18:16:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 33JIFpnW3000522; Wed, 19 Apr 2023 14:15:51 -0400 From: Tom Lane To: Tobias Bussmann cc: Mark Guertin , pgsql-bugs@lists.postgresql.org Subject: Re: pg_basebackup: errors on macOS on directories with ".DS_Store" files In-reply-to: <794684A8-D3FF-4109-815F-C9EB66AF65EA@gmx.net> References: <794684A8-D3FF-4109-815F-C9EB66AF65EA@gmx.net> Comments: In-reply-to Tobias Bussmann message dated "Wed, 19 Apr 2023 19:51:55 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3000520.1681928151.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 19 Apr 2023 14:15:51 -0400 Message-ID: <3000521.1681928151@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tobias Bussmann writes: >> pg_basebackup: error: backup failed: ERROR: invalid segment number 0 i= n file ".DS_Store" > This seem to be the same problem as already discussed in [1]: Tools like= pg_basebackup and pg_checksums can get upset if there are random extra fi= les in $PGDATA/base, /global or /pg_tblspc. Unfortunately, macOS has the h= abit to create such files quite easily. If I read the outcome correctly, w= e are back at a blacklist approach, so adding ".DS_Store" may be something= to consider. = > [1]: Yeah. I wonder if we ought to do something more general, and ignore all files whose names start with ".". regards, tom lane