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 1oF5wm-0002tQ-KF for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2022 03:36:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oF5wk-0006dT-Tz for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Jul 2022 03:36:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oF5wk-0006dJ-Li for pgsql-bugs@lists.postgresql.org; Sat, 23 Jul 2022 03:36:54 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oF5wi-0008Bo-82 for pgsql-bugs@lists.postgresql.org; Sat, 23 Jul 2022 03:36:54 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id EFB485C00DE; Fri, 22 Jul 2022 23:36:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 22 Jul 2022 23:36:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc: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=1658547410; x=1658633810; bh=I1groTCigH S5cIuHhx0S9Y//XzlIjiMtEisvtwXReDA=; b=ZRUZKMB2YD5hw9DRU6UctFukHI v5nzTm4d0EjZX5THseR+H9JPwd/rqetBFhADmonElX79fj8RMRAfzorbc9OOMsdZ 4V2RywrW2ZAiIhIg7szta03nFU+rVeBAzc4d92S85wmy/bAVQU3kzS4ONKMaFtDA YjZ8ASLXWKcUKchbqqCWc/M3XN4AvP7tcco655wvsKrM5Bqk/DhUTg3OX1ktzFf0 Bho9ATk07XrkkoiQ8Wa1WLj7aTTk5kX0nz0p7hIqwg/Muu1w0bzr37ELbGTQKO4G gmopOW8UShZ42vFf+tq4JIOO0eOND7lzSnMI6vF+CRUjtyMbPtu2mGMXE3rQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=1658547410; x=1658633810; bh=I1groTCigHS5cIuHhx0S9Y//XzlI jiMtEisvtwXReDA=; b=eXyH8FRk6k5CH0vIeE0Cv9+SN53z/uwKZGwMRZ/iW6QD YywwueaQsI9JkqD3IWKl5ePQcDh11WVpZOZ2cf3odHUud8SEhcJz0urnHCx5wGoz RauWEM6MYkbQpXq90ajPZDqtTFAOQOkXXmv4ugRm+LZ0Cy/BOBMpyNFK0VU4Fqqy EWWbWp9g5LpBj4jnWnbxn5CsmEf9bwX3yjq++Aog1JE6WptWhbK4VGYaZKClvkgb I+yroNPKVsjwhgQfR0uuBjorERwgqusJBtFBDKAKULt2+RfjWTjw4eqCv+QjIxf4 BxrGW/NELvm/LTNN/1jfVC7yFP8mGQzXiLdJdphhRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddtfedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepjeejtdelleeggeelffduhfej tdeuvdekkeethffhuedvvdeuudeugeefudevtdeinecuffhomhgrihhnpehgihhthhhusg drtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Jul 2022 23:36:49 -0400 (EDT) Date: Sat, 23 Jul 2022 12:36:47 +0900 From: Michael Paquier To: Zsolt Ero Cc: pgsql-bugs@lists.postgresql.org Subject: Re: could not link file in wal restore lines Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hzdJLn+B4YgaSqEf" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --hzdJLn+B4YgaSqEf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 22, 2022 at 04:24:54AM -0500, Zsolt Ero wrote: > I've opened an issue on pgbackrest, where the developer confirmed that > those files are not touched by pgbackrest, they are basically copied back > exactly as they were. The backup/restore is on the same partition as the > data folder, so no chance of file system changes, etc. Single master, no > replication. >=20 > I'm always doing clean data dir + init_db so there is nothing there before > the restore. I can replicate this behaviour 100%. >=20 > PostgreSQL version: psql (PostgreSQL) 12.11 (Ubuntu 12.11-1.pgdg18.04+1) >=20 > OS is Ubuntu 18.04 >=20 > pgbackrest issue: https://github.com/pgbackrest/pgbackrest/issues/1815 >=20 > log details: >=20 > could not link file "pg_wal/000000010000015600000098" to > "pg_wal/00000001000001570000006E": File exists FWIW, the backend code has protections to prevent *exactly* this kind of problems when recycling WAL segment files at checkpoints with a set of LWLocks taken on the control file, for one. Perhaps you have messed up things and you have finished in such a state that backrest writes to pg_wal/ concurrently with a cluster running and running a checkpoint, which would explain those link() calls to be failing? -- Michael --hzdJLn+B4YgaSqEf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmLbbM8ACgkQnvQgOdby QH0v+g/8DPh3ztZFbhxP/FPDp6DgeYT4sm/EVlZah+XV8oO/RDw/YsrioULkQYWD EPIzSdPtjuNrnB0WaU0hOhHVhDfALpW2tFdKf+wnC0CZFVZd9nAcP/aB6h9ynHdx b+btboHO4/fps0OMVF3F3tW3LVeP2sDycFu/L7e7S7yex0MZ5bdxsF5Mz1MO65u0 1T+oSL5jPpSPWTjJrObDKYNiAGTVBL16MF+noh5hKjXKR6xhz/zy0Nio8Cr2i2ri tdSG84ehXJMcklNhlAaZ0khaq9LTBeRa0JThCWzPE9Rn9n9BZRZ2arwVy2skinWw Cuf44twSdcFH3ss5+jq2mcUccdZOnP4hV1ZkVJdhESminnFs/xHoTZdXh3EnOFap J1sMdQ3QFGfDSB12xzYb2HChjLkau3Afi5w9MuDemr/prSi/F9KZXa/6GF2xNpZ+ 6DdQNqiQIpreQ3HqWY7HzCFaX4Z5qDwAjECKpFUk1mwNVdoLCRqweZjar2fb7etm 6feRzNHnk2E3MhKJcZ9GrQK77MhM5PwHFQpjWeFK18TBCvN0jq5+j5zUwD3tKaeF Z1NABAQHCQd2xHT7BvyA4yS4K57Gbfs1jqb9lbC7KHJqMqKsKciuhyqcbY9/gCmy nQUmocec4JoJbVPRPfRRrDXkEM6wPjRnG9yU1l8Lbvi7pJOrh9g= =N9uQ -----END PGP SIGNATURE----- --hzdJLn+B4YgaSqEf--