postgresql/src/bin/scripts
Michael Paquier a21ec1a959 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:44 +09:00
..
po Translation updates 2019-08-05 15:36:58 +02:00
t Improve inefficient regexes in vacuumdb TAP test. 2018-05-08 20:17:43 -04:00
.gitignore Add TAP tests for client programs 2014-04-14 21:33:46 -04:00
clusterdb.c Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
common.c Remove some code related to 7.3 and older servers from tools of src/bin/ 2019-05-07 14:20:19 +09:00
common.h Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
createdb.c Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
createlang.c Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
createuser.c Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
dropdb.c Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
droplang.c Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
dropuser.c Empty search_path in Autovacuum and non-psql/pgbench clients. 2018-02-26 07:39:48 -08:00
Makefile Revert restructuring of bin/scripts/Makefile 2018-02-27 14:08:53 +01:00
nls.mk Translation updates 2016-02-08 14:21:00 -05:00
pg_isready.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
reindexdb.c Fix error reporting in reindexdb 2019-05-11 13:01:24 +09:00
vacuumdb.c Fix error handling of vacuumdb when running out of fds 2019-08-26 11:14:44 +09:00