Skip to content

Latest commit

 

History

History
66 lines (39 loc) · 2.75 KB

20231016_06.md

File metadata and controls

66 lines (39 loc) · 2.75 KB

PostgreSQL 17 preview - 添加checkpoint delay等待事件

作者

digoal

日期

2023-10-16

标签

PostgreSQL , PolarDB , wait_event , 等待事件 , 检查点延迟


背景

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0013ba290b6684d095d93517ff2ca1fadf79bdb9

新增2个等待事件:

  • CHECKPOINT_DELAY_COMPLETE "Waiting for a backend that blocks a checkpoint from completing."
  • CHECKPOINT_DELAY_START "Waiting for a backend that blocks a checkpoint from starting."
Add wait events for checkpoint delay mechanism.  
  
author	Thomas Munro <tmunro@postgresql.org>	  
Fri, 13 Oct 2023 03:43:22 +0000 (16:43 +1300)  
committer	Thomas Munro <tmunro@postgresql.org>	  
Fri, 13 Oct 2023 03:43:22 +0000 (16:43 +1300)  
commit	0013ba290b6684d095d93517ff2ca1fadf79bdb9  
tree	19ee8a4489ce78072a07277260ec30be8bf24be3	tree  
parent	7e1f544827ec843918f189765863269ff3a1c77e	commit | diff  
Add wait events for checkpoint delay mechanism.  
  
When MyProc->delayChkptFlags is set to temporarily block phase  
transitions in a concurrent checkpoint, the checkpointer enters a  
sleep-poll loop to wait for the flag to be cleared.  We should show that  
as a wait event in the pg_stat_activity view.  
  
Reviewed-by: Robert Haas <robertmhaas@gmail.com>  
Reviewed-by: Michael Paquier <michael@paquier.xyz>  
Discussion: https://postgr.es/m/CA%2BhUKGL7Whi8iwKbzkbn_1fixH3Yy8aAPz7mfq6Hpj7FeJrKMg%40mail.gmail.com  

digoal's wechat