- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit592a589
committed
Prevent concurrent SimpleLruTruncate() for any given SLRU.
The SimpleLruTruncate() header comment states the new coding rule. Toachieve this, add locktype "frozenid" and two LWLocks. This closes arare opportunity for data loss, which manifested as "apparentwraparound" or "could not access status of transaction" errors. Dataloss is more likely in pg_multixact, due to released branches' thinmargin between multiStopLimit and multiWrapLimit. If a user's physicalreplication primary logged ": apparent wraparound" messages, the usershould rebuild standbys of that primary regardless of symptoms. At lessrisk is a cluster having emitted "not accepting commands" errors or"must be vacuumed" warnings at some point. One can test a cluster forthis data loss by running VACUUM FREEZE in every database. Back-patchto 9.5 (all supported versions).Discussion:https://postgr.es/m/20190218073103.GA1434723@rfd.leadboat.com1 parentb538e83 commit592a589
File tree
11 files changed
+117
-13
lines changed- doc/src/sgml
- src
- backend
- access/transam
- commands
- storage/lmgr
- utils/adt
- include/storage
11 files changed
+117
-13
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10215 | 10215 |
| |
10216 | 10216 |
| |
10217 | 10217 |
| |
10218 |
| - | |
| 10218 | + | |
| 10219 | + | |
10219 | 10220 |
| |
10220 | 10221 |
| |
10221 | 10222 |
| |
| |||
10243 | 10244 |
| |
10244 | 10245 |
| |
10245 | 10246 |
| |
| 10247 | + | |
10246 | 10248 |
| |
10247 | 10249 |
| |
10248 | 10250 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1738 | 1738 |
| |
1739 | 1739 |
| |
1740 | 1740 |
| |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
1741 | 1747 |
| |
1742 | 1748 |
| |
1743 | 1749 |
| |
| |||
1906 | 1912 |
| |
1907 | 1913 |
| |
1908 | 1914 |
| |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
1909 | 1920 |
| |
1910 | 1921 |
| |
1911 | 1922 |
| |
| |||
2082 | 2093 |
| |
2083 | 2094 |
| |
2084 | 2095 |
| |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
2085 | 2101 |
| |
2086 | 2102 |
| |
2087 | 2103 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1208 | 1208 |
| |
1209 | 1209 |
| |
1210 | 1210 |
| |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
1211 | 1219 |
| |
1212 | 1220 |
| |
1213 | 1221 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
349 | 349 |
| |
350 | 350 |
| |
351 | 351 |
| |
352 |
| - | |
353 |
| - | |
| 352 | + | |
| 353 | + | |
354 | 354 |
| |
355 | 355 |
| |
356 | 356 |
| |
|
Lines changed: 27 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
244 | 244 |
| |
245 | 245 |
| |
246 | 246 |
| |
247 |
| - | |
| 247 | + | |
| 248 | + | |
248 | 249 |
| |
249 |
| - | |
250 |
| - | |
251 |
| - | |
252 |
| - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
253 | 254 |
| |
254 |
| - | |
255 |
| - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
256 | 259 |
| |
257 | 260 |
| |
258 |
| - | |
259 |
| - | |
| 261 | + | |
| 262 | + | |
260 | 263 |
| |
261 | 264 |
| |
262 | 265 |
| |
| |||
2177 | 2180 |
| |
2178 | 2181 |
| |
2179 | 2182 |
| |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
2180 | 2187 |
| |
2181 | 2188 |
| |
2182 | 2189 |
| |
| |||
2185 | 2192 |
| |
2186 | 2193 |
| |
2187 | 2194 |
| |
2188 |
| - | |
2189 | 2195 |
| |
2190 | 2196 |
| |
2191 | 2197 |
| |
| |||
2205 | 2211 |
| |
2206 | 2212 |
| |
2207 | 2213 |
| |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
2208 | 2225 |
| |
2209 | 2226 |
| |
2210 | 2227 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1344 | 1344 |
| |
1345 | 1345 |
| |
1346 | 1346 |
| |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1347 | 1355 |
| |
1348 | 1356 |
| |
1349 | 1357 |
| |
| |||
1533 | 1541 |
| |
1534 | 1542 |
| |
1535 | 1543 |
| |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
1536 | 1547 |
| |
1537 | 1548 |
| |
1538 | 1549 |
| |
| |||
1642 | 1653 |
| |
1643 | 1654 |
| |
1644 | 1655 |
| |
| 1656 | + | |
| 1657 | + | |
1645 | 1658 |
| |
1646 | 1659 |
| |
1647 | 1660 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
460 | 460 |
| |
461 | 461 |
| |
462 | 462 |
| |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
463 | 478 |
| |
464 | 479 |
| |
465 | 480 |
| |
| |||
1098 | 1113 |
| |
1099 | 1114 |
| |
1100 | 1115 |
| |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
1101 | 1121 |
| |
1102 | 1122 |
| |
1103 | 1123 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
| 54 | + | |
| 55 | + |
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
| |||
254 | 255 |
| |
255 | 256 |
| |
256 | 257 |
| |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
257 | 269 |
| |
258 | 270 |
| |
259 | 271 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 |
| |
63 | 66 |
| |
64 | 67 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
| 141 | + | |
141 | 142 |
| |
142 | 143 |
| |
143 | 144 |
| |
| |||
194 | 195 |
| |
195 | 196 |
| |
196 | 197 |
| |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
197 | 207 |
| |
198 | 208 |
| |
199 | 209 |
| |
|
0 commit comments
Comments
(0)