postgresql/src
Michael Paquier 4fca146009 Fix error handling of vacuumdb when running out of fds
When trying to use a high number of jobs, vacuumdb has only checked for
a maximum number of jobs used, causing confusing failures when running
out of file descriptors when the jobs open connections to Postgres.
This commit changes the error handling so as we do not check anymore for
a maximum number of allowed jobs when parsing the option value with
FD_SETSIZE, but check instead if a file descriptor is within the
supported range when opening the connections for the jobs so as this is
detected at the earliest time possible.

Also, improve the error message to give a hint about the number of jobs
recommended, using a wording given by the reviewers of the patch.

Reported-by: Andres Freund
Author: Michael Paquier
Reviewed-by: Andres Freund, Álvaro Herrera, Tom Lane
Discussion: https://postgr.es/m/20190818001858.ho3ev4z57fqhs7a5@alap3.anarazel.de
Backpatch-through: 9.5
2019-08-26 11:14:33 +09:00
..
backend Fix typo 2019-08-21 11:12:44 -04:00
bin Fix error handling of vacuumdb when running out of fds 2019-08-26 11:14:33 +09:00
common Tolerate EINVAL when calling fsync() on a directory. 2019-02-24 23:52:20 +13:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Fix typo 2019-08-21 11:12:44 -04:00
interfaces Stamp 10.10. 2019-08-05 17:16:54 -04:00
makefiles Define WIN32_STACK_RLIMIT throughout win32 and cygwin builds. 2019-04-09 08:25:42 -07:00
pl Fix C++ incompatibilities in plpgsql's header files. 2019-05-31 12:34:54 -04:00
port Stamp 10.10. 2019-08-05 17:16:54 -04:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Disallow changing an inherited column's type if not all parents changed. 2019-08-18 17:11:58 -04:00
timezone Tweak our special-case logic for the IANA "Factory" timezone. 2019-07-26 13:07:08 -04:00
tools Fix syntax error in commit 20e99cddd. 2019-07-25 14:42:16 -04:00
tutorial Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Build src/test/isolation during "make" and "make install". 2017-11-22 20:18:52 -08:00
Makefile.global.in Consistently test for in-use shared memory. 2019-04-12 22:36:42 -07:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00