forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit71d84ef
committed
Fix error handling of vacuumdb and reindexdb when running out of fds
When trying to use a high number of jobs, vacuumdb (and more recentlyreindexdb) has only checked for a maximum number of jobs used, causingconfusing failures when running out of file descriptors when the jobsopen connections to Postgres. This commit changes the error handling soas we do not check anymore for a maximum number of allowed jobs whenparsing the option value with FD_SETSIZE, but check instead if a filedescriptor is within the supported range when opening the connectionsfor 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 jobsrecommended, using a wording given by the reviewers of the patch.Reported-by: Andres FreundAuthor: Michael PaquierReviewed-by: Andres Freund, Álvaro Herrera, Tom LaneDiscussion:https://postgr.es/m/20190818001858.ho3ev4z57fqhs7a5@alap3.anarazel.deBackpatch-through: 9.51 parent6338fa3 commit71d84ef
File tree
4 files changed
+12
-28
lines changed- src/bin/scripts
4 files changed
+12
-28
lines changedLines changed: 0 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
156 |
| - | |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 | 156 |
| |
163 | 157 |
| |
164 | 158 |
| |
|
Lines changed: 12 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 | 97 |
| |
112 | 98 |
| |
113 | 99 |
| |
| |||
246 | 232 |
| |
247 | 233 |
| |
248 | 234 |
| |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
249 | 247 |
| |
250 | 248 |
| |
251 | 249 |
| |
|
Lines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
25 |
| - | |
26 | 24 |
| |
27 | 25 |
| |
28 | 26 |
| |
|
Lines changed: 0 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 | 184 |
| |
191 | 185 |
| |
192 | 186 |
| |
|
0 commit comments
Comments
(0)