pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: While waiting for a condition variable, detect postmaster death.
2+ messages / 1 participants
[nested] [flat]

* pgsql: While waiting for a condition variable, detect postmaster death.
@ 2018-01-09 17:35  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-01-09 17:35 UTC (permalink / raw)
  To: pgsql-committers

While waiting for a condition variable, detect postmaster death.

The general assumption for postmaster child processes is that they
should just exit(1), reasonably promptly, if the postmaster disappears.
condition_variable.c neglected this consideration and could be left
waiting forever, if the counterpart process it is waiting for has
done the right thing and exited.

We had some discussion of adjusting the WaitEventSet API to make it
harder to make this type of mistake in future; but for the moment,
and for v10, let's make this narrow fix.

Discussion: https://postgr.es/m/20412.1515456143@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/80259d4dbf47d13ef4c105e06c4ea084639d9466

Modified Files
--------------
src/backend/storage/lmgr/condition_variable.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: While waiting for a condition variable, detect postmaster death.
@ 2018-01-09 17:35  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-01-09 17:35 UTC (permalink / raw)
  To: pgsql-committers

While waiting for a condition variable, detect postmaster death.

The general assumption for postmaster child processes is that they
should just exit(1), reasonably promptly, if the postmaster disappears.
condition_variable.c neglected this consideration and could be left
waiting forever, if the counterpart process it is waiting for has
done the right thing and exited.

We had some discussion of adjusting the WaitEventSet API to make it
harder to make this type of mistake in future; but for the moment,
and for v10, let's make this narrow fix.

Discussion: https://postgr.es/m/20412.1515456143@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d56a5f994c216847df3338e148b2ae72f20b2e0f

Modified Files
--------------
src/backend/storage/lmgr/condition_variable.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-01-09 17:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-09 17:35 pgsql: While waiting for a condition variable, detect postmaster death. Tom Lane <tgl@sss.pgh.pa.us>
2018-01-09 17:35 pgsql: While waiting for a condition variable, detect postmaster death. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox