- Notifications
You must be signed in to change notification settings - Fork5
Commiteeeb782
committed
Fix a rare race condition when commit_siblings > 0 and a transaction commits
at the same instant as a new backend is spawned. Since CountActiveBackends()doesn't hold ProcArrayLock, it needs to be prepared for the case that apointer at the end of the proc array is still NULL even though numProcs saysit should be valid, since it doesn't hold ProcArrayLock. Backpatch to 8.1.8.0 and earlier had this right, but it was broken in the split of PGPROC andsinval shared memory arrays.Per report and proposal by Marko Kreen.1 parentdb20729 commiteeeb782
1 file changed
+16
-1
lines changedLines changed: 16 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
| 26 | + | |
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| |||
201 | 201 |
| |
202 | 202 |
| |
203 | 203 |
| |
| 204 | + | |
204 | 205 |
| |
205 | 206 |
| |
206 | 207 |
| |
| |||
1108 | 1109 |
| |
1109 | 1110 |
| |
1110 | 1111 |
| |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1111 | 1126 |
| |
1112 | 1127 |
| |
1113 | 1128 |
| |
|
0 commit comments
Comments
(0)