Re: Unportable implementation of background worker start
Andres Freund <andres@anarazel.de>
On 2017-04-26 11:42:38 -0400, Tom Lane wrote: > 1. Let HEAD stand as it is. We have a problem with slow response to > bgworker start requests that arrive while ServerLoop is active, but that's > a pretty tight window usually (although I believe I've seen it hit at > least once in testing). > > 2. Reinstall the pselect patch, blacklisting NetBSD and HPUX and whatever > else we find to be flaky. Then only the blacklisted platforms have the > problem. That seems unattractive at this point. I'm not looking forward to having to debug more random platforms that implement this badly in a yet another weird way. > 3. Go ahead with converting the postmaster to use WaitEventSet, a la > the draft patch I posted earlier. I'd be happy to do this if we were > at the start of a devel cycle, but right now seems a bit late --- not > to mention that we really need to fix 9.6 as well. Yea, backpatching this to 9.6 seems like a bigger hammer than appropriate. I'm on the fence WRT master, I think there's an argument to be made that this is going to become a bigger and bigger problem, and that we'll wish in a year or two that we had fewer releases with parallelism etc that don't use WaitEventSets. > I'm leaning to doing #1 plus the maybe_start_bgworker change. There's > certainly room for difference of opinion here, though. Thoughts? I see you did the bgworker thing - that seems good to me. Thanks, Andres
Commits
-
Cope with glibc too old to have epoll_create1().
- 53b157846024 9.6.3 landed
- 82ebbeb0abfe 10.0 landed
-
Make latch.c more paranoid about child-process cases.
- fa31b6f4e969 10.0 landed
- 866452cd8b52 9.6.3 landed
-
Allow multiple bgworkers to be launched per postmaster iteration.
- aa1351f1eec4 10.0 landed
- e880df25ec35 9.6.3 landed
-
Revert "Use pselect(2) not select(2), if available, to wait in postmaster's loop."
- e615605239f6 9.6.3 landed
- 64925603c972 10.0 landed
-
Use pselect(2) not select(2), if available, to wait in postmaster's loop.
- b9515b628797 9.6.3 landed
- 81069a9efc5a 10.0 landed
-
Run the postmaster's signal handlers without SA_RESTART.
- 8939020853e6 10.0 landed
- dfa4baf91cee 9.6.3 landed
-
Fix postmaster's handling of fork failure for a bgworker process.
- dba1f310a564 9.5.7 landed
- 63f64d2824b2 9.6.3 landed
- 4fe04244b584 10.0 landed
- 436b560b86ca 9.4.12 landed
-
Partially revert commit 536d47bd9d5fce8d91929bee3128fa1d08dbcc57.
- 5041cdf2b792 10.0 landed
-
Avoid depending on non-POSIX behavior of fcntl(2).
- 3e51725b3854 10.0 landed
- f07f6b62c9a7 9.6.3 landed
- ce521e50eb56 9.4.12 landed
- ad8fb69cccf4 9.2.21 landed
- 9f8be7542156 9.5.7 landed
- 899960b9fec2 9.3.17 landed
-
Remove long-obsolete catering for platforms without F_SETFD/FD_CLOEXEC.
- 536d47bd9d5f 10.0 landed