forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit78f8c67
committed
Properly terminate the array returned by GetLockConflicts().
GetLockConflicts() has for a long time not properly terminated thereturned array. During normal processing the returned array is zeroinitialized which, while not pretty, is sufficient to be recognized asa invalid virtual transaction id. But the HotStandby case is more thanaesthetically broken: The allocated (and reused) array is neitherzeroed upon allocation, nor reinitialized, nor terminated.Not having a terminating element means that the end of the array willnot be recognized and that recovery conflict handling will thus readahead into adjacent memory. Only terminating when hitting memorycontent that looks like a invalid virtual transaction id. Luckilythis seems so far not have caused significant problems, besides makingrecovery conflict more expensive.Discussion: 20150127142713.GD29457@awork2.anarazel.deBackpatch into all supported branches.1 parent37e0f13 commit78f8c67
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1990 | 1990 |
| |
1991 | 1991 |
| |
1992 | 1992 |
| |
| 1993 | + | |
| 1994 | + | |
1993 | 1995 |
| |
1994 | 1996 |
| |
1995 | 1997 |
| |
| |||
2035 | 2037 |
| |
2036 | 2038 |
| |
2037 | 2039 |
| |
| 2040 | + | |
| 2041 | + | |
2038 | 2042 |
| |
2039 | 2043 |
| |
2040 | 2044 |
| |
|
0 commit comments
Comments
(0)