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 1uP9yJ-001ZOX-H6 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jun 2025 01:09:43 +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 1uP9yH-00CrTj-IH for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jun 2025 01:09:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uP9yH-00CrTb-8c for pgsql-hackers@lists.postgresql.org; Wed, 11 Jun 2025 01:09:41 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uP9yF-001Kgo-3B for pgsql-hackers@lists.postgresql.org; Wed, 11 Jun 2025 01:09:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 55B19ZeZ947175; Tue, 10 Jun 2025 21:09:35 -0400 From: Tom Lane To: Michael Paquier cc: Michael Banck , Postgres hackers Subject: Re: Safeguards against incorrect fd flags for fsync() In-reply-to: References: <20191009062640.GB21379@paquier.xyz> <68480868.5d0a0220.1e214d.68a6@mx.google.com> Comments: In-reply-to Michael Paquier message dated "Wed, 11 Jun 2025 08:56:54 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <947173.1749604175.1@sss.pgh.pa.us> Date: Tue, 10 Jun 2025 21:09:35 -0400 Message-ID: <947174.1749604175@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > We don't have a trace of O_ACCMODE in the tree, and POSIX defines it. > I'm wondering how the buildfarm would react on that, but perhaps > that's fine on !WIN32. It's hard to say with all the hosts there, at > least the CI is OK. POSIX has required O_ACCMODE in fcntl.h at least since 2008, if I'm reading things correctly. So it's probably safe to depend on this symbol. Still, I'd like to be closer to having a working Hurd buildfarm member before we take a portability risk that would only benefit Hurd. > Another thing that may be worth considering is if we should remove > this sanity check. Nah. regards, tom lane