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 1psGjC-00013S-F8 for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Apr 2023 05:33:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1psGjA-0007tq-D9 for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Apr 2023 05:33:04 +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 1psGj9-0007th-W6 for pgsql-bugs@lists.postgresql.org; Fri, 28 Apr 2023 05:33:03 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1psGj7-002IfL-3d for pgsql-bugs@lists.postgresql.org; Fri, 28 Apr 2023 05:33:02 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id DCA135C015E; Fri, 28 Apr 2023 01:32:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 28 Apr 2023 01:32:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1682659979; x=1682746379; bh=BE uA2fprWIPxFP3V7XtoJIrY71MWUNo5jxuw35lPU/Y=; b=orkEVRe+Kz/gOcLKNK htU9A5yNKLC2acPuH62/VwcXqYJYRyGbyPqyl1P/M3b2fHdqYD4MLSiwPdg1CmOH 5L9VHD9Rp7hdw3W76zJeWMDPPjD8DLc8P5u0yc70nib2sphncf6oKZydJ50Rl6QK MPbMTwxJAZeNJmKH24Icf/Kp2Cc14zPJqsVCNpxz0FR10I5BGn91QqrgzfUDzMy5 nJJVt3omvYWuMp9EF54TJhzDSxxmlbEwy5oAkail3f8SSI01hhjQlZSH2u/X/YCo ypfSgLXAHVl4Mu08RG54ppqhya777IFa7NX5qt4Funk59g4wPV0lQx2SA2kuUBep mWrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1682659979; x=1682746379; bh=BEuA2fprWIPxF P3V7XtoJIrY71MWUNo5jxuw35lPU/Y=; b=FhkM/+EDeoWNSn6vLK3TxMjtBzemJ EIeREzqNbxqsefyPoe9IeVB5lqcbSfzT5wB3dxdWcNgpseDI6iGOx+7YVsrU5mUh WG13k5vnSzZb/8KsID6PMxIOchJnSgfEZjakcIDbYKHcK3i6HIopoEiZgWFAIitY UT8Awnl8YsRWGFvQb43Z0ZWq17mRJT0ouL2NjAXRHRyaJfoBRHt+MeOeg/+YDXVr wOd6fNO363cr9nlikcrZESAm3/D8s8NdBBpmNS2wpUiLgDDOueBd/AM/R5viIbol GSptvTgDVi4A6dF5+5Gf8DOwo2FtamTfrU4qQJzdHfkIOgHsldMAOkWlQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedujedgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepgeffjeevgfevuddvjedtvddt ieejheduueelvddufedtgfefjedvkeevkeeivddvnecuffhomhgrihhnpehpohhsthhgrh gvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 Apr 2023 01:32:55 -0400 (EDT) Date: Fri, 28 Apr 2023 14:32:52 +0900 From: Michael Paquier To: Daniel Gustafsson Cc: Kyotaro Horiguchi , t.bussmann@gmx.net, tgl@sss.pgh.pa.us, markguertin@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: pg_basebackup: errors on macOS on directories with ".DS_Store" files Message-ID: References: <20230421.120220.1132981318960692233.horikyota.ntt@gmail.com> <7B26A7F6-375B-451A-8B6B-FD1CCA23FFEE@yesql.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FkFMARcQYNMBu8Vl" Content-Disposition: inline In-Reply-To: <7B26A7F6-375B-451A-8B6B-FD1CCA23FFEE@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --FkFMARcQYNMBu8Vl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Apr 27, 2023 at 04:22:08PM +0200, Daniel Gustafsson wrote: > I'm not sure I follow. While "." and ".." and hidden files share a leading '.' > character they are vastly different and combining them in the same check would > trade lines of code for readability. I'm not sure that's a net win. If you > mean that the checks should be reordered such that hidden files are checked for > before "pgsql_tmp", then that seems equally arbitrary no? There is no reason > to believe that hidden files would be more frequently found than "pgsql_tmp > files. I don't have strong opinions on the order, I'm just not sure either is > better than the other. FWIW, I don't have an issue with the order of the checks as presented in v2. > 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. 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. -- Michael --FkFMARcQYNMBu8Vl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmRLWoMACgkQnvQgOdby QH3JnQ/8D/WxDOncBl3kmEyfPWDvqcjAdMffdhOhqLgUUv6QCNWyc1LMsaOWoQbu IxWPa1x/qbuGLaoXgPe4drU/XAyg3Izq1qImUPras8k/Gs8HmAxzTuQdwSfGvQt2 oXHCsQIcSKTK5kGU0wX9yWZx8690ERIPtwBgMczq6CwUP0F0IRjj3VkVaIIZfuf0 daf/RkA84x/XgL66v1eMF5fr0HyxYjywrlrvR6i2dZeHDuU8qjdxWVy4x2AkJ/jo 9ENlalAuX90qkX90Z0VnzQAv0852tVrsd0elAnP6ZGVMMRwcJG+I210c8smycD1B AeDGc+rXEUXD6HO4PIhwdONQCczQsna1kZh5JXUbdQtU3Pyk7KutOLqLa9VNzaEs HgFJL3KzAlZYijSg1m1G07uQ9sgt4nziYreaV+doDxQC9hKllpSMhWr6+USa0q8A 1W5p+Ggm63xjYeuGJyefDF7NI8CwBIL7c5/JMj0+C7cWENAcw/FS10OyyxdJTSob CSUCqUoH7yBkZR/ITMFDsEQxIN60ZSF4kzosuIqjc5KFvbeaifKY41DWVTHZXhL4 caz4lmmjN2eN2p6+a3xVT4/e0nw5DRYevMi5F4lfVbduCoCKmlC5GEHXVO62HHLR etF3SnbQ4GEODe+/CuQuocvVc27sIVtUZaGR7MxHOnY+fTE7pXI= =PRXt -----END PGP SIGNATURE----- --FkFMARcQYNMBu8Vl--