Re: [HACKERS] parallel.c oblivion of worker-startup failures
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-01-22T13:46:07Z
Lists: pgsql-hackers
On Fri, Jan 19, 2018 at 10:59 PM, Amit Kapila <amit.kapila16@gmail.com> wrote: > The patch doesn't apply cleanly on the head, but after rebasing it, I > have reviewed and tested it and it seems to be working fine. Apart > from this specific issue, I think we should consider making > nworkers_launched reliable (at the very least for cases where it > matters). You seem to be of opinion that can be a source of subtle > bugs which I don't deny but now I think we are starting to see some > use cases of such a mechanism as indicated by Peter G. in parallel > create index thread. Even, if we find some way for parallel create > index to not rely on that assumption, I won't be surprised if some > future parallelism work would have such a requirement. Isn't making nworkers_launched reliable exactly what this patch does? It converts the rare cases in which nworkers_launched would have been unreliable into errors, precisely so that code like parallel CREATE INDEX doesn't need to worry about the case where it's inaccurate. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Report an ERROR if a parallel worker fails to start properly.
- 2843c01a56eb 9.6.7 landed
- 383e4268ff8c 10.2 landed
- 2badb5afb89c 11.0 landed
-
Report failure to start a background worker.
- facd94e72f27 9.4.16 landed
- 0426a77ce465 9.5.11 landed
- b75644066091 9.6.7 landed
- a8ef4e81e6f2 10.2 landed
- 28724fd90d2f 11.0 landed