forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbbe3c02
committed
Revise postmaster startup/shutdown logic to eliminate the problem that a
constant flow of new connection requests could prevent the postmaster fromcompleting a shutdown or crash restart. This is done by labeling childprocesses that are "dead ends", that is, we know that they were launched onlyto tell a client that it can't connect. These processes are managedseparately so that they don't confuse us into thinking that we can't advanceto the next stage of a shutdown or restart sequence, until the very endwhere we must wait for them to drain out so we can delete the shmem segment.Per discussion of a misbehavior reported by Keaton Adams.Since this code was baroque already, and my first attempt at fixing theproblem made it entirely impenetrable, I took the opportunity to rewrite itin a state-machine style. That eliminates some duplicated code sections andhopefully makes everything a bit clearer.1 parentc556b29 commitbbe3c02
1 file changed
+462
-307
lines changed0 commit comments
Comments
(0)