Commit 481725c
committed
Correct StartupSUBTRANS for page wraparound
StartupSUBTRANS() incorrectly handled cases near the max pageid in the subtrans
data structure, which in some cases could lead to errors in startup for Hot
Standby.
This patch wraps the pageids correctly, avoiding any such errors.
Identified by exhaustive crash testing by Jeff Janes.
Jeff Janes1 parent a914a04 commit 481725cCopy full SHA for 481725c
File tree
Expand file treeCollapse file tree
1 file changed
+5
-1
lines changedOpen diff view settings
Filter options
- src/backend/access/transam
Expand file treeCollapse file tree
1 file changed
+5
-1
lines changedOpen diff view settings
Collapse file
src/backend/access/transam/subtrans.c
Copy file name to clipboardExpand all lines: src/backend/access/transam/subtrans.c+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
44 | 44 | |
45 | 45 | |
46 | 46 | |
47 | | - |
| 47 | + |
| 48 | + |
48 | 49 | |
49 | 50 | |
50 | 51 | |
| ||
254 | 255 | |
255 | 256 | |
256 | 257 | |
| 258 | + |
| 259 | + |
| 260 | + |
257 | 261 | |
258 | 262 | |
259 | 263 | |
|
0 commit comments