postgresql/src/bin/scripts
Michael Paquier 63fc3b1240 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:24 +09:00
..
po Translation updates 2019-08-05 15:54:23 +02:00
t Initial pgperltidy run for v12. 2019-05-22 13:36:19 -04:00
.gitignore Remove createlang and droplang 2017-03-23 14:16:45 -04:00
clusterdb.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
common.c Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00
common.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04: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 Fix program build rule in src/bin/scripts/Makefile. 2019-01-04 19:12:22 -05: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 Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
vacuumdb.c Fix error handling of vacuumdb when running out of fds 2019-08-26 11:14:24 +09:00