forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc6043fc
committed
Fix missing initializations of MyProc.delayChkptEnd
This commit fixes an oversight introduced in10520f4, that has addeddelayChkptEnd to PGPROC to avoid ABI breakages on stable branches, wheretwo spots have missed to initialize this variable (delayChkpt wasswitched back from int to bool, and it was initialized as 0 so there wasno consequences for it):- InitProcess(), where the per-process data structures of a backend areinitialized.- InitAuxiliaryProcess(), same but for auxiliary processes.An interruption during relation truncation while this flag is set couldcause an assertion failure when a follow-up process does a relationtruncation while reusing the same PGPROC entry. A second effect couldbe incorrect checkpoint end delays.While on it, add an assertion in ProcArrayClearTransaction() fordelayChkptEnd to be in line with5788e25. This is needed only for v14.This issue affects v11~v14, but not v15~, as we use a single fieldcalled delayChkptFlags to delay checkpoints there.Author: suyu.cmj (mengjuan.cmj@alibaba-inc.com)Reviewed-by: Kyotaro Horiguchi, Michael PaquierDiscussion:https://postgr.es/m/9c3d2a49-db5f-43cb-840b-d58f9a684295.mengjuan.cmj@alibaba-inc.comBackpatch-through: 111 parent28af91b commitc6043fc
2 files changed
+5
-2
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
947 | 947 |
| |
948 | 948 |
| |
949 | 949 |
| |
| 950 | + | |
950 | 951 |
| |
951 | 952 |
| |
952 | 953 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
394 | 394 |
| |
395 | 395 |
| |
396 | 396 |
| |
397 |
| - | |
| 397 | + | |
| 398 | + | |
398 | 399 |
| |
399 | 400 |
| |
400 | 401 |
| |
| |||
579 | 580 |
| |
580 | 581 |
| |
581 | 582 |
| |
582 |
| - | |
| 583 | + | |
| 584 | + | |
583 | 585 |
| |
584 | 586 |
| |
585 | 587 |
| |
|
0 commit comments
Comments
(0)