summaryrefslogtreecommitdiff
path: root/src/include/pgstat.h
diff options
context:
space:
mode:
authorThomas Munro2019-03-13 21:25:27 +0000
committerThomas Munro2019-03-13 21:59:33 +0000
commitc6c9474aafa4de357ae424cd18b69e8bf7a4babe (patch)
tree99d567cf37361f559828c2240fc93989a2124f76 /src/include/pgstat.h
parent5655565c077c53b6e9b4b9bfcdf96439cf3af065 (diff)
Use condition variables to wait for checkpoints.
Previously we used a polling/sleeping loop to wait for checkpoints to begin and end, which leads to up to a couple hundred milliseconds of needless thumb-twiddling. Use condition variables instead. Author: Thomas Munro Reviewed-by: Andres Freund Discussion: https://postgr.es/m/CA%2BhUKGLY7sDe%2Bbg1K%3DbnEzOofGoo4bJHYh9%2BcDCXJepb6DQmLw%40mail.gmail.com
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r--src/include/pgstat.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index 725c8b0d64a..ea6cc8b560f 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -817,6 +817,8 @@ typedef enum
WAIT_EVENT_BGWORKER_STARTUP,
WAIT_EVENT_BTREE_PAGE,
WAIT_EVENT_CLOG_GROUP_UPDATE,
+ WAIT_EVENT_CHECKPOINT_DONE,
+ WAIT_EVENT_CHECKPOINT_START,
WAIT_EVENT_EXECUTE_GATHER,
WAIT_EVENT_HASH_BATCH_ALLOCATING,
WAIT_EVENT_HASH_BATCH_ELECTING,