pgsql: Make idle backends exit if the postmaster dies.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make idle backends exit if the postmaster dies.
Date: 2015-11-12 14:16:40
Message-ID: E1Zwsg4-0006WV-Q8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make idle backends exit if the postmaster dies.

Letting backends continue to run if the postmaster has exited prevents
PostgreSQL from being restarted, which in many environments is
catastrophic. Worse, if some other backend crashes, we no longer have
any protection against shared memory corruption. So, arrange for them
to exit instead. We don't want to expend many cycles on this, but
including postmaster death in the set of things that we wait for when
a backend is idle seems cheap enough.

Rajeev Rastogi and Robert Haas

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ac1d7945f866b1928c2554c0f80fd52d7f977772

Modified Files
--------------
src/backend/libpq/be-secure.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-11-12 14:17:16 pgsql: libpq: Notice errors a backend may have sent just before dying.
Previous Message Robert Haas 2015-11-12 12:44:58 pgsql: Provide readfuncs support for custom scans.