Re: Missed check for too-many-children in bgworker spawning
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-10-09T14:21:15Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > On Mon, Oct 7, 2019 at 4:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> ... Moreover, we have to --- and already do, I trust --- deal with >> other resource-exhaustion errors in exactly the same code path, notably >> fork(2) failure which we simply can't predict or prevent. Doesn't the >> parallel query logic already deal sanely with failure to obtain as many >> workers as it wanted? > If we fail to obtain workers because there are not adequate workers > slots available, parallel query deals with that smoothly. But, once > we have a slot, any further failure will trigger the parallel query to > ERROR out. Well, that means we have a not-very-stable system then. We could improve on matters so far as the postmaster's child-process arrays are concerned, by defining separate slot "pools" for the different types of child processes. But I don't see much point if the code is not prepared to recover from a fork() failure --- and if it is, that would a fortiori deal with out-of-child-slots as well. regards, tom lane
Commits
-
Check for too many postmaster children before spawning a bgworker.
- 8c2910ce5ed7 9.5.20 landed
- c69e982a60fb 9.6.16 landed
- 7e8d0eb63fbb 12.1 landed
- 3887e9455f81 13.0 landed
- 1b5c2ddcdefc 10.11 landed
- 021065aac676 11.6 landed
-
Report an ERROR if a parallel worker fails to start properly.
- 2badb5afb89c 11.0 cited