Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQLvE-009GXS-D6 for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Jul 2024 07:02:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sQLvC-009qbB-7S for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Jul 2024 07:02:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQLvB-009qb3-Sm for pgsql-hackers@lists.postgresql.org; Sun, 07 Jul 2024 07:02:53 +0000 Received: from fout7-smtp.messagingengine.com ([103.168.172.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQLv4-000onL-QQ for pgsql-hackers@postgresql.org; Sun, 07 Jul 2024 07:02:52 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 966921380653; Sun, 7 Jul 2024 03:02:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 07 Jul 2024 03:02:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2; t=1720335765; x=1720422165; bh=tckxqwZD5u9eb5rJD5wglkYSteWlzs8p 7vqq9IWeL/g=; b=l9W2qVJeFn5k8Kj9hPzEbBp6n4XaSAQM359eDlpsfDO0+iI3 xNSRagLBnd1Jp4VpiZSG3bfoVq9YjsiLdXXF1W+aW1yj9oxNvLlU6WVbb2wRF233 z2rvo2HhaA8sWo9SrITH+d1EksDz829BrAXEX0ygR2MU1mc2Hw1qqfLBL3SIUmIv 1StvCo0lGd3lSZNxu6PAK0F8IA4SBy1pfC+PqtQ54iRL9LBDLGpEd+weSLd3v7UE 9MA/ZTsaeVX2mThyebg0n+vAsNpXk5wM1lFHB9sTK3/0kNxn7EVy8K7IhHELOCYO hQcYRMe9x4UYzKVgfy7cdzPc+8Wz+5jZCV5mrg== 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:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1720335765; x=1720422165; bh=tckxqwZD5u9eb5rJD5wglkYSteWlzs8p7vq q9IWeL/g=; b=uGJmPxwC4TQHjJhlDJM/Rrx+ugY0imexyqOGeiavvZj2aZtN8Av 3kKOZXcZY++A51vpPVDW7HY3E/c+NCpWeJsAfAo9QIbEpOIia72NJ+UStv51woZe R8ZlXhgh+R5OU1KAyAi/UfSa50GfJaVhaWzGem9jplFmi8PPhi5xv5ZoF873raFz vW1EsJKZv+hLj6UWUaqfACgWzMphp0x/8c7duRaLkI1hJVMnkKQfash5H74DJPOw FyMzfcy3YNu3qwHvftwvnP1kU6jS4E9XnWBfVej8RMxC3MV1vRQeJauItLgOLkgb N+2xKbE55CVmUuabn+KC25PRqli94mCh+Hw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeggdduudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnheptdejledtlefhtdejieehiefhteegvddugeeijefhgedvudfghffgheetheev leeknecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghdpphhoshhtghhrrdgvsh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgu rhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 7 Jul 2024 03:02:45 -0400 (EDT) Date: Sun, 7 Jul 2024 00:02:43 -0700 From: Andres Freund To: pgsql-hackers@postgresql.org, Andrew Dunstan Cc: Dave Page Subject: 010_pg_basebackup.pl vs multiple filesystems Message-ID: <20240707070243.sb77kp4ubowauctz@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, While working on [1] I encountered the issue that, on github-actions, 010_pg_basebackup.pl fails on windows. The reason for that is that github actions uses two drives, with TMP/TEMP located on c:, the tested code on d:. This causes the following code to fail: # Create a temporary directory in the system location. my $sys_tempdir = PostgreSQL::Test::Utils::tempdir_short; # On Windows use the short location to avoid path length issues. # Elsewhere use $tempdir to avoid file system boundary issues with moving. my $tmploc = $windows_os ? $sys_tempdir : $tempdir; rename("$pgdata/pg_replslot", "$tmploc/pg_replslot") or BAIL_OUT "could not move $pgdata/pg_replslot"; dir_symlink("$tmploc/pg_replslot", "$pgdata/pg_replslot") or BAIL_OUT "could not symlink to $pgdata/pg_replslot"; It's not possible to move (vs copy) a file between two filesystems, on most operating systems. Which thus leads to: [23:02:03.114](0.288s) Bail out! could not move D:\a\winpgbuild\winpgbuild\postgresql-17beta2\build/testrun/pg_basebackup/010_pg_basebackup\data/t_010_pg_basebackup_main_data/pgdata/pg_replslot This logic was added in commit e213de8e785aac4e2ebc44282b8dc0fcc74834e8 Author: Andrew Dunstan Date: 2023-07-08 11:21:58 -0400 Use shorter location for pg_replslot in pg_basebackup test and revised in commit e9f15bc9db7564a29460d089c0917590bc13fffc Author: Andrew Dunstan Date: 2023-07-08 12:34:25 -0400 Fix tmpdir issues with commit e213de8e78 The latter deals with precisely this issue, for !windows. I've temporarily worked around this by setting TMP/TEMP to something else, but ISTM we need a better solution. Greetings, Andres Freund [1] https://www.postgresql.org/message-id/CA%2BOCxowQhMHFNRLTsXNuJpC96KRtSPHYKJuOS%3Db-Zrwmy-P4-g%40mail.gmail.com [2] https://postgr.es/m/666ac55b-3400-fb2c-2cea-0281bf36a53c%40dunslane.net