postgresql/src
Thomas Munro 78aaa0e823 Don't reset latch in ConditionVariablePrepareToSleep().
It's not OK to do that without calling CHECK_FOR_INTERRUPTS().
Let the next wait loop deal with it, following the usual pattern.

One consequence of this bug was that a SIGTERM delivered in a very
narrow timing window could leave a parallel worker process waiting
forever for a condition variable that will never be signaled, after
an error was raised in other process.

The code is a bit different in the stable branches due to commit
1321509f, making problems less likely there.  No back-patch for now,
but we may finish up deciding to make a similar change after more
discussion.

Author: Thomas Munro
Reviewed-by: Shawn Debnath
Reported-by: Tomas Vondra
Discussion: https://postgr.es/m/CA%2BhUKGJOm8zZHjVA8svoNT3tHY0XdqmaC_kHitmgXDQM49m1dA%40mail.gmail.com
2020-01-28 15:28:36 +13:00
..
backend Don't reset latch in ConditionVariablePrepareToSleep(). 2020-01-28 15:28:36 +13:00
bin Refactor XLogReadRecord(), adding XLogBeginRead() function. 2020-01-26 11:39:00 +02:00
common Fix some memory leaks and improve restricted token handling on Windows 2020-01-27 11:02:05 +09:00
fe_utils Reduce size of backend scanner's tables. 2020-01-13 15:04:31 -05:00
include Remove dependency on HeapTuple from predicate locking functions. 2020-01-28 13:13:04 +13:00
interfaces Add connection parameters to control SSL protocol min/max in libpq 2020-01-28 10:40:48 +09:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Reduce size of backend scanner's tables. 2020-01-13 15:04:31 -05:00
port Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Added relation name in error messages for constraint checks. 2020-01-28 07:48:10 +05:30
timezone Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tools Add exclusion to headercheck 2020-01-24 12:23:06 +01:00
tutorial Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Add support for automatically updating Unicode derived files 2020-01-09 10:08:14 +01:00
Makefile.shlib
nls-global.mk