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 1oE7IE-0006Mx-Qg for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jul 2022 10:51:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oE7IC-0000J9-4w for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jul 2022 10:51:00 +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 1oE7IA-0000Ci-Qe for pgsql-hackers@lists.postgresql.org; Wed, 20 Jul 2022 10:50:59 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oE7I7-00054H-Aj for pgsql-hackers@postgresql.org; Wed, 20 Jul 2022 10:50:57 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 440005C0063; Wed, 20 Jul 2022 06:50:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 20 Jul 2022 06:50:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version: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=1658314253; x=1658400653; bh=u b6rB3Q4aZSfpHXgB04PiN9Wmeh2JWMUf/MbPxGPYQQ=; b=ecjhQnubnpH40lt/t abAiruXMXV7/M4GpUhmsnC9c5sSvT4uPpln+Byg7ZHDiS0pYdUf/JOykBydKaN5U Iqg4dEPqwSRLw3DUPuYBKzr65T4gtMWM4SwZPzblU7jNUbwvVcgnQBy5CurdjoMz 66I9h4c5THZeLe99d2mCcYWdrIF6Hmm+IobPKK4zjoAxFtxy9c4IjncYzQrTifGe 14GftQTISQF/oPC6LljWk2LITXL/8jR81Zb2NHlGSrovBJ1FsuIpVPJRY+fMzJSK 01Ph7olKYuw88nY9vMRxic4T0VmxMA2SgJfnGJAxnY10ZsO3ANMBdYgw6RrutYVs 8v6VA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudelvddgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfggtggugfgjsehmke erredttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhr vgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpeduleekkefgtd dttedtkefguddvieffleetgeejiefhteehkeevfeettdduvdfhueenucffohhmrghinhep vghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhr gh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Jul 2022 06:50:52 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 5E1CE369; Wed, 20 Jul 2022 12:50:49 +0200 (CEST) Date: Wed, 20 Jul 2022 12:50:49 +0200 From: Alvaro Herrera To: Kyotaro Horiguchi Cc: dilipbalaut@gmail.com, robertmhaas@gmail.com, michael@paquier.xyz, rjuju123@gmail.com, pgsql-hackers@postgresql.org Subject: Re: standby recovery fails (tablespace related) (tentative patch and discussion) Message-ID: <20220720105049.jk52353p6ce35idb@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ugp6tm4ilhq6dt7x" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220714214740.drhmvdx2aseqgvvb@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ugp6tm4ilhq6dt7x Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit v26 here. I spent some time fighting the readdir() stuff for Windows (so that get_dirent_type returns LNK for junction points) but couldn't make it to work and was unable to figure out why. So I ended up doing what do_pg_backup_start is already doing: an #ifdef to call pgwin32_is_junction instead. I remove the newly added path_is_symlink function, because I realized that it would mean an extra syscall everywhere other than Windows. So if somebody wants to fix get_dirent_type() so that it works properly on Windows, we can change all these places together. I also change the use of allow_invalid_pages to allow_in_place_tablespaces. We could add a separate GUC for this, but it seems overengineering. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Most hackers will be perfectly comfortable conceptualizing users as entropy sources, so let's move on." (Nathaniel Smith) --ugp6tm4ilhq6dt7x Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v26-0001-Fix-replay-of-create-database-records-on-standby.patch"