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.98.2) (envelope-from ) id 1x8mW3-00000001U83-2LMN for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Sep 2026 22:29:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x8mW2-0000000BffE-21Vk for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Sep 2026 22:29:38 +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.98.2) (envelope-from ) id 1x8mW2-0000000Bff6-0o6w for pgsql-hackers@lists.postgresql.org; Mon, 21 Sep 2026 22:29:38 +0000 Received: from mail-oa2-x10.google.com ([2607:f8b0:4864:30::10]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x8mVz-00000000Z8o-3ZAt for pgsql-hackers@lists.postgresql.org; Mon, 21 Sep 2026 22:29:37 +0000 Received: by mail-oa2-x10.google.com with SMTP id 586e51a60fabf-4693691fde7so2291564fac.3 for ; Mon, 21 Sep 2026 15:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790029776; x=1790634576; darn=lists.postgresql.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=uFZ7J9vJxquiYw1aWz6RZkOXtVHyglnlD59WFFpBbBA=; b=rJrcnKVxzuBCAYOiTCH2dRduuWYd77B/Xg79dv3pZEQMQ0WPU31M57t1A58DF143dh mhIrNeVZaKaZfvNPsWkICbv0HnhCdSdY1B+QLcs91uyyNLB+tc17fgzO96fME7sLmEk7 x50BsMPMc1+zD03TKvJo9pYI2YXDqERGkTCEpMpKkrBkEZwchgPG5cqlhTdiRQ288Gar wowMKkWlQtNjdgAq1CVsoQhVU1yCdkRN+wkpCoCBCS7I6lqguF6w+Re2IsouJQ4iHKGp 3RKPZkrdYLQ3tTLbqleTSugF/l74w+DuJmkmD9zOaaUN+Xp81HRmI0WIvbJFLg9jFAIf hU9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790029776; x=1790634576; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=uFZ7J9vJxquiYw1aWz6RZkOXtVHyglnlD59WFFpBbBA=; b=0Wp/hjWXy9uvEbfDrpYZYvSxi0+UuNgFY2QLDWwvZXXvuDPFMf0rpBKnXTxd46MQEH ma0t/iUXoRZpYprblkZjHNfohhVy4OpjT2vqi6TPmgS+JaSi5o8YnGNhZMdHb2yFBYzO mzuZhi7QdyEnvJLQsTSiYUgbFBu+arfIY85P+AJxJ3v060nq7lLliwEWnl3i9VNVQkC6 893szI8ECocgZBFmARf5PHxDr3bAcRdqbCbhw+5IB/vuNU0TG22KasFn/Mmuv2cM+Kvw gl5EPzGWRwj162Ou/OyP2CepdVQk7KV8Opc0keY1pYpQyZF01YWZp9HfuakNeXOMSxCB KDaA== X-Forwarded-Encrypted: i=1; AKwUvBzxjKhwMNc0ltNX6+Dm+ctYnMGXSc5WND7aZkIJH56bLo7VAqwuKGqylVzSxbLpxZpFJ1E9g7CneX4HmKqf@lists.postgresql.org X-Gm-Message-State: AFuF++nkf9HzRGLcJGFT4/NhG9802PcLsjP3WwGY1DRKlBUbyuCD0bgm 1gmZymxtuxIN1HpPg3OdyvujGI4dgF4Q0Kiecy9gqZSEeNVIXh498US9sKeHEGgArsE= X-Gm-Gg: AYBFou35d1n/0Fi7jeS4j/PT14Ro1QMEz6oeEkxJ25Fzir/Zj6t+N362zFjiqzheHZL 3KR1YwS6c1EhefWWBBXgc3hk7l/gju6cMsTsGv/DRW1lTQBUrJYvBm3Q72A+ozmvh5FwZ3qvMxd 7QJwV/4jOelPGVrFvhmvr4lO8R4rltt+MCrxzDFWjnm0t1UtnrcDlHmmd6zLuvmdQ4O6UaZTjHw HZk9lcFSOaNFp0TJgvHy0ajCjSWAT1KVh+mfsNrPI/SfFIubmKE1K3wQMZ3YNiPeh9eIy8so4a9 JIReDLDuk6clUC6EaNlsnHkeXCLuSEPlOZFBmZJ8ddYuAvleo6v3NlJSYVoK2LWVZsw0tQl8Iod 4w7GDFAngCIXCcbfUR4wlx1D8N53x2UtWKmC5G5atCpMkcuQhdC1Yt4z1J+1VFvN9x18Eai2ey7 aTEvZEALwjvZOd1hodRuRythCLEaAcM6yJBA+Nfz6BH9pqzldAREJNm6DOniSXfVLwulnQp1+a7 sOtly2WMYTPeVrIFrYye26DQ7KuvHfSnWInrdRnoz/YpoiZ3mjEp8BTQbXO1X8sXAcbCIY9wPYu 0NMQr40= X-Received: by 2002:a05:6820:1807:b0:6b7:8415:d78c with SMTP id 006d021491bc7-6ca9ca575b0mr12841034eaf.55.1790029775628; Mon, 21 Sep 2026 15:29:35 -0700 (PDT) Received: from ?IPV6:2603:8082:2b40:1f:b42b:87df:b323:cf7a? ([2603:8082:2b40:1f:b42b:87df:b323:cf7a]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6d17b4d4a27sm697452eaf.0.2026.09.21.15.29.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2026 15:29:35 -0700 (PDT) Message-ID: <340f649d-5b37-4161-956c-e16d42abcfa3@gmail.com> Date: Mon, 21 Sep 2026 17:28:58 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] unrecognized win32 error 448 (ERROR_UNTRUSTED_MOUNT_POINT) breaks tablespaces on Win11 26200 To: Greg Burd , "pgsql-hackers@lists.postgresql.org" References: Content-Language: en-US From: Bryan Green In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/21/2026 11:24 AM, Greg Burd wrote: > Hi hackers, > > My Windows-on-Arm buildfarm animal (unicorn: Windows 11 Pro build 26200.9457, > aarch64, MSVC 19.50, meson, cassert) currently fails 13 TAP tests on > REL_19_STABLE, and all 13 have the same cause: Windows returns error code 448 > for stat() on a tablespace path, src/port/win32error.c does not know that code, > and so the error is reported as the catch-all EINVAL ("Invalid argument"). > > The core regression suite passes (meson check: Ok:1 Fail:0); this is confined to > tests that use tablespaces. > > In the logs: > > LOG: unrecognized win32 error code: 448 > ERROR: could not stat directory "pg_tblspc/16387/PG_19_202609165/5": Invalid argument > STATEMENT: CREATE TABLE test1 (a int) TABLESPACE tblspc1; > > Error 448 is: > > #define ERROR_UNTRUSTED_MOUNT_POINT 448L (winerror.h, Windows SDK 10.0.26100) > 448 -> "The path cannot be traversed because it contains an untrusted mount point" > > I think this is a newer Windows hardening behavior around reparse points. Since > PostgreSQL emulates symlinks with junction points (IO_REPARSE_TAG_MOUNT_POINT) > for pg_tblspc, paths under pg_tblspc are subject to it. > > So, the mapping below is worth having on its own (an unmapped Win32 code > becoming EINVAL is never useful), but I suspect the real fix for tablespaces on > recent Windows is in pgsymlink(). I would appreciate a second opinion from > people who know the Windows file-system code better than I do, particularly on > whether populating PrintName is the right move. > > Happy to run experiments on this machine. > > best. > > -greg Microsoft has changed what accounts can traverse untrusted junctions in it's latest releases. If you search for openssh and RedirectionGuard you will find interesting reading. The error you are hitting is RedirectionGuard. PrintName is display only. SubstituteName is what resolves the mount point, so populating PrintName changes nothing. PG does not create trusted junctions. pg_ctl launches the postmaster with a restricted token and the backend refuses to run with admin rights at all. So, junctions are created with a non-admin token which makes them un-trusted by construction. A process that has EnforceRedirectionTrust set refuses to traverse an untrusted one and gets 448. The policy is opt-in, so it is not on by default, and it is inherited by children. You would need something that is launching the process that has RedirectionGuard enabled or that it was opted in for the OS. That is also why CI does not catch it. The GitHub Actions Windows job runs on windows-2022, which does not enforce this. A 26200 animal with an enforcing parent (process or OS) does. I would check if you are running a non-standard terminal or the Win32-Openssh 10.0.0.0-pre2 installer was used on Unicorn. That installer makes ssh.exe enforce redirection trust. There are ways to check if anything in the ancestor chain has that set. -- Bryan Green EDB: https://www.enterprisedb.com