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 1m5U1X-0005dY-3e for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jul 2021 14:13:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m5U1V-0005iC-Vn for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jul 2021 14:13:33 +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 1m5U1V-0005gK-Np for pgsql-hackers@lists.postgresql.org; Mon, 19 Jul 2021 14:13:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5U1T-0002LR-I7 for pgsql-hackers@postgresql.org; Mon, 19 Jul 2021 14:13:32 +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 16JEDRnU234365; Mon, 19 Jul 2021 10:13:27 -0400 From: Tom Lane To: Thomas Munro cc: Andres Freund , pgsql-hackers Subject: Re: O_DIRECT on macOS In-reply-to: References: <20210530201244.6mv5q7yhrjpeo5mc@alap3.anarazel.de> <20210713015609.kq3ywdlesrdopdrb@alap3.anarazel.de> <188068.1626669719@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Mon, 19 Jul 2021 16:54:40 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <234363.1626704007.1@sss.pgh.pa.us> Date: Mon, 19 Jul 2021 10:13:27 -0400 Message-ID: <234364.1626704007@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > On Mon, Jul 19, 2021 at 4:42 PM Tom Lane wrote: >> prairiedog thinks that Assert is too optimistic about whether all >> those flags exist. > Fixed. Hmm ... we used to have to avoid putting #if constructs in the arguments of macros (such as StaticAssertStmt). Maybe that's not a thing anymore with C99, and in any case this whole stanza is fairly platform-specific so we may not run into a compiler that complains. But my hindbrain wants to see this done with separate statements, eg #if defined(O_CLOEXEC) StaticAssertStmt((PG_O_DIRECT & O_CLOEXEC) == 0, "PG_O_DIRECT collides with O_CLOEXEC"); #endif regards, tom lane