Re: [PATCH v3 1/1] Fix detection of preadv/pwritev support for OSX.

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, James Hilliard <james(dot)hilliard1(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Sergey Shinderuk <s(dot)shinderuk(at)postgrespro(dot)ru>
Subject: Re: [PATCH v3 1/1] Fix detection of preadv/pwritev support for OSX.
Date: 2021-07-12 19:39:42
Message-ID: 527661e9-91c9-8992-1a9e-242d91573aa4@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06.07.21 22:34, Tom Lane wrote:
> 2. We'd really like to use preadv/pwritev where available.

A couple of things that I haven't seen made clear in this thread yet:

- Where is the availability boundary for preadv/pwritev on macOS?

- What is the impact of having vs. not having these functions?

> I
> maintain that MACOSX_DEPLOYMENT_TARGET is not only not the right
> approach to that, but it's actually counterproductive. It forces
> you to build for the lowest common denominator, ie the oldest macOS
> release you want to support. Even when running on a release that
> has pwritev, your build will never use it.

I think this is just the way that building backward-compatible binaries
on macOS (and Windows) works. You have to pick a target that is old
enough to capture enough of your audience but not too old to miss out on
interesting new OS features. People who build GUI applications for
macOS, iOS, etc. face this trade-off all the time; for POSIX-level
programming things just move slower so that the questions present
themselves less often. I don't think we need to go out of our way to
fight this system. This is something users will have opted into after
all. Users who want Linux-style rebuilt-for-every-release binaries have
those options available on macOS as well.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2021-07-12 19:45:39 Re: speed up verifying UTF-8
Previous Message Alvaro Herrera 2021-07-12 18:51:37 Re: Partition Check not updated when insert into a partition