pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: O_DIRECT on macOS
Date: Mon, 19 Jul 2021 10:13:27 -0400
Message-ID: <234364.1626704007@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+hUKGLejkpxaeJAvb7X3VyDr7R-otExoGW86uACp89t7g6=bg@mail.gmail.com>
References: <CA+hUKG+ADiyyHe0cun2wfT+SVnFVqNYPxoO6J9zcZkVO7+NGig@mail.gmail.com>
	<20210530201244.6mv5q7yhrjpeo5mc@alap3.anarazel.de>
	<CA+hUKG+uoxCCtu2MZx0WKh_F__8sZm8bnoP2oaBS4NA21jhRqA@mail.gmail.com>
	<CA+hUKGLYTWZ7=y=p=VqwOjqyTnCMa4g46DxkX73Qiuc0U8R3EQ@mail.gmail.com>
	<20210713015609.kq3ywdlesrdopdrb@alap3.anarazel.de>
	<CA+hUKGLty89LL6G7buZDWO4wd5T=wcNPjTfUKd5LRJZzWcf8sw@mail.gmail.com>
	<188068.1626669719@sss.pgh.pa.us>
	<CA+hUKGLejkpxaeJAvb7X3VyDr7R-otExoGW86uACp89t7g6=bg@mail.gmail.com>

Thomas Munro <thomas.munro@gmail.com> writes:
> On Mon, Jul 19, 2021 at 4:42 PM Tom Lane <tgl@sss.pgh.pa.us> 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





view thread (16+ messages)  latest in thread

Message-ID: <234364.1626704007@sss.pgh.pa.us>
Permalink:  ../234364.1626704007@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/234364.1626704007@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thomas.munro@gmail.com, andres@anarazel.de
  Subject: Re: O_DIRECT on macOS
  In-Reply-To: <234364.1626704007@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox