postgresql/src
Alvaro Herrera 1816a1c6ff
Fix checkpoint signalling
Checkpointer uses its MyLatch to wake up when a checkpoint request is
received.  But before commit c655077639 the latch was not used for
anything else, so the code could just go to sleep after each loop
without rechecking the sleeping condition.  That commit added a separate
ResetLatch in its code path[1], which can cause a checkpoint to go
unnoticed for potentially a long time.

Fix by skipping sleep if any checkpoint flags are set.  Also add a test
to verify this; authored by Kyotaro Horiguchi.

[1] CreateCheckPoint -> InvalidateObsoleteReplicationSlots ->
ConditionVariableTimeSleep

Report and diagnosis by Kyotaro Horiguchi.
Co-authored-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/20200408.141956.891237856186513376.horikyota.ntt@gmail.com
2020-04-29 18:46:42 -04:00
..
backend Fix checkpoint signalling 2020-04-29 18:46:42 -04:00
bin Fix typo 2020-04-29 10:13:25 +02:00
common Fix update-unicode target 2020-04-19 14:59:29 +02:00
fe_utils Add SQL type xid8 to expose FullTransactionId to users. 2020-04-07 12:03:59 +12:00
include Repair performance regression in information_schema.triggers view. 2020-04-24 12:02:36 -04:00
interfaces Fix memory leak in libpq when using sslmode=verify-full 2020-04-22 07:27:03 +09:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Use perl warnings pragma consistently 2020-04-13 11:55:45 -04:00
port Be more careful about extracting encoding from locale strings on Windows. 2020-03-30 11:14:58 -04:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Fix checkpoint signalling 2020-04-29 18:46:42 -04:00
timezone Update time zone data files to tzdata release 2020a. 2020-04-24 10:54:47 -04:00
tools Update Windows timezone name list to include currently-known zones. 2020-04-24 17:53:23 -04:00
tutorial Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Update Unicode data to Unicode 13.0.0 and CLDR 37 2020-04-24 09:52:59 +02:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00