pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix compilation failure of vacuumdb and reindexdb with OpenBSD
Date: Tue, 20 Aug 2019 07:13:20 +0000
Message-ID: <E1hzyKW-0007wj-IV@gemulon.postgresql.org> (raw)

Fix compilation failure of vacuumdb and reindexdb with OpenBSD

FD_SETSIZE is included in sys/select.h per POSIX, and this header
inclusion has been moved to scripts_parallel.c as of 5f38403 without
moving the variable, causing a compilation failure on recent versions of
OpenBSD (6.6 was the version used in the report).

In order to take care of the failure, move FD_SETSIZE directly to
scripts_parallel.c with a wrapper controlling the maximum number of
parallel slots supported, based on a suggestion by Andres Freund.

While on it, reduce the maximum number to be less than FD_SETSIZE,
leaving some room for stdin, stdout and such as they consume some file
descriptors.

The buildfarm did not complain about that, as it happens to only be
an issue on recent versions of OpenBSD and there is no coverage in this
area.  51c3e9f fixed a similar set of issues.

Bug: #15964
Reported-by: Sean Farrell
Discussion: https://postgr.es/m/15964-c1753bdfed722e04@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/56f8f9624ba050c7c47dd97547b7fafb866f2bdd

Modified Files
--------------
src/bin/scripts/reindexdb.c        |  4 ++--
src/bin/scripts/scripts_parallel.c | 14 ++++++++++++++
src/bin/scripts/scripts_parallel.h |  2 ++
src/bin/scripts/vacuumdb.c         |  4 ++--
4 files changed, 20 insertions(+), 4 deletions(-)



Message-ID: <E1hzyKW-0007wj-IV@gemulon.postgresql.org>
Permalink:  ../E1hzyKW-0007wj-IV@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hzyKW-0007wj-IV@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Fix compilation failure of vacuumdb and reindexdb with OpenBSD
  In-Reply-To: <E1hzyKW-0007wj-IV@gemulon.postgresql.org>
  References: <E1hzyKW-0007wj-IV@gemulon.postgresql.org>

* 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