postgresql/src/bin/scripts
Michael Paquier 56f8f9624b 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
2019-08-20 16:10:20 +09:00
..
po Translation updates 2019-06-17 15:30:20 +02:00
t Add support for --jobs in reindexdb 2019-07-27 22:21:18 +09:00
.gitignore Remove createlang and droplang 2017-03-23 14:16:45 -04:00
clusterdb.c Refactor parallelization processing code in src/bin/scripts/ 2019-07-19 09:31:58 +09:00
common.c Refactor parallelization processing code in src/bin/scripts/ 2019-07-19 09:31:58 +09:00
common.h Refactor parallelization processing code in src/bin/scripts/ 2019-07-19 09:31:58 +09:00
createdb.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
createuser.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
dropdb.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
dropuser.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
Makefile Add support for --jobs in reindexdb 2019-07-27 22:21:18 +09:00
nls.mk Unified logging system for command-line programs 2019-04-01 20:01:35 +02:00
pg_isready.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
reindexdb.c Fix compilation failure of vacuumdb and reindexdb with OpenBSD 2019-08-20 16:10:20 +09:00
scripts_parallel.c Fix compilation failure of vacuumdb and reindexdb with OpenBSD 2019-08-20 16:10:20 +09:00
scripts_parallel.h Fix compilation failure of vacuumdb and reindexdb with OpenBSD 2019-08-20 16:10:20 +09:00
vacuumdb.c Fix compilation failure of vacuumdb and reindexdb with OpenBSD 2019-08-20 16:10:20 +09:00