postgresql/src/backend
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
..
access Fix some typos 2020-04-27 14:59:36 +09:00
bootstrap Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
catalog Fix definition of pg_statio_all_tables view 2020-04-28 11:30:33 +03:00
commands Fix error case for CREATE ROLE ... IN ROLE. 2020-04-25 05:09:30 +01:00
executor Fix transient memory leak for SRFs in FROM. 2020-04-22 19:53:06 -07:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit Extend ExecBuildAggTrans() to support a NULL pointer check. 2020-03-04 17:29:18 -08:00
lib Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
libpq Improve error messages after LoadLibrary() 2020-04-13 10:24:46 +02:00
main Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nodes Add ALTER .. NO DEPENDS ON 2020-04-20 13:42:12 -04:00
optimizer Fix cost_incremental_sort for expressions with varno 0 2020-04-23 00:15:24 +02:00
parser Add ALTER .. NO DEPENDS ON 2020-04-20 13:42:12 -04:00
partitioning Fix some typos 2020-04-27 14:59:36 +09:00
po Translation updates 2019-06-17 15:30:20 +02:00
port Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postmaster Fix checkpoint signalling 2020-04-29 18:46:42 -04:00
regex Update copyrights for 2020 2020-01-01 12:21:45 -05:00
replication Check slot->restart_lsn validity in a few more places 2020-04-28 20:39:04 -04:00
rewrite Fix INSERT OVERRIDING USER VALUE behavior 2020-03-31 08:50:39 +02:00
snowball Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statistics Modify additional power 2 calculations to use new helper functions 2020-04-08 18:29:51 +12:00
storage Revert 0f5ca02f53 2020-04-08 11:37:27 +03:00
tcop Revert 0f5ca02f53 2020-04-08 11:37:27 +03:00
tsearch Further cleanup of ts_headline code. 2020-04-09 15:38:43 -04:00
utils Fix full text search to handle NOT above a phrase search correctly. 2020-04-27 12:21:04 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Add missing gettext triggers 2020-04-28 13:35:40 +02:00