| From: | tgl(at)postgresql(dot)org (Tom Lane) |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Revise postmaster startup/shutdown logic to eliminate the problem |
| Date: | 2007-08-09 01:18:43 |
| Message-ID: | 20070809011843.496899FB45F@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Log Message:
-----------
Revise postmaster startup/shutdown logic to eliminate the problem that a
constant flow of new connection requests could prevent the postmaster from
completing a shutdown or crash restart. This is done by labeling child
processes that are "dead ends", that is, we know that they were launched only
to tell a client that it can't connect. These processes are managed
separately so that they don't confuse us into thinking that we can't advance
to the next stage of a shutdown or restart sequence, until the very end
where 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 the
problem made it entirely impenetrable, I took the opportunity to rewrite it
in a state-machine style. That eliminates some duplicated code sections and
hopefully makes everything a bit clearer.
Modified Files:
--------------
pgsql/src/backend/postmaster:
postmaster.c (r1.539 -> r1.540)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c.diff?r1=1.539&r2=1.540)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2007-08-09 02:33:58 | pgsql: Fix search for SGML stylesheets to include the place where Gentoo |
| Previous Message | Neil Conway | 2007-08-08 18:07:05 | pgsql: Fix a gradual memory leak in ExecReScanAgg(). |