- Notifications
You must be signed in to change notification settings - Fork5
Commit5fc8937
committed
Ensure ANALYZE phase is not skipped because of canceled truncate.
Patchb19e425 attempted topreserve existing behavior regarding statistics generation in thecase that a truncation attempt was canceled due to lock conflicts.It failed to do this accurately in two regards: (1) autovacuum hadpreviously generated statistics if the truncate attempt failed toinitially get the lock rather than having started the attempt, and(2) the VACUUM ANALYZE command had always generated statistics.Both of these changes were unintended, and are reverted by thispatch. On review, there seems to be consensus that the previousfailure to generate statistics when the truncate was terminatedwas more an unfortunate consequence of how that effort waspreviously terminated than a feature we want to keep; so thispatch generates statistics even when an autovacuum truncationattempt terminates early. Another unintended change which is kepton the basis that it is an improvement is that when a VACUUMcommand is truncating, it will the new heuristic for avoidingblocking other processes, rather than keeping anAccessExclusiveLock on the table for however long the truncationtakes.Per multiple reports, with some renaming per patch by Jeff Janes.Backpatch to 9.0, where problem was created.1 parent91fa853 commit5fc8937
1 file changed
+22
-36
lines changedLines changed: 22 additions & 36 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
82 |
| - | |
83 |
| - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
84 | 84 |
| |
85 | 85 |
| |
86 | 86 |
| |
| |||
285 | 285 |
| |
286 | 286 |
| |
287 | 287 |
| |
288 |
| - | |
289 |
| - | |
290 |
| - | |
291 |
| - | |
292 |
| - | |
293 |
| - | |
294 |
| - | |
295 |
| - | |
296 |
| - | |
297 |
| - | |
298 |
| - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
299 | 292 |
| |
300 | 293 |
| |
301 | 294 |
| |
| |||
1347 | 1340 |
| |
1348 | 1341 |
| |
1349 | 1342 |
| |
1350 |
| - | |
1351 |
| - | |
| 1343 | + | |
| 1344 | + | |
1352 | 1345 |
| |
1353 | 1346 |
| |
1354 | 1347 |
| |
1355 |
| - | |
1356 |
| - | |
1357 |
| - | |
1358 |
| - | |
| 1348 | + | |
1359 | 1349 |
| |
1360 | 1350 |
| |
1361 |
| - | |
1362 |
| - | |
1363 |
| - | |
1364 |
| - | |
1365 |
| - | |
1366 |
| - | |
| 1351 | + | |
| 1352 | + | |
1367 | 1353 |
| |
1368 | 1354 |
| |
1369 | 1355 |
| |
1370 | 1356 |
| |
1371 |
| - | |
| 1357 | + | |
1372 | 1358 |
| |
1373 | 1359 |
| |
1374 | 1360 |
| |
| |||
1448 | 1434 |
| |
1449 | 1435 |
| |
1450 | 1436 |
| |
1451 |
| - | |
1452 |
| - | |
1453 | 1437 |
| |
1454 | 1438 |
| |
1455 | 1439 |
| |
| |||
1467 | 1451 |
| |
1468 | 1452 |
| |
1469 | 1453 |
| |
1470 |
| - | |
1471 |
| - | |
1472 |
| - | |
1473 |
| - | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
1474 | 1458 |
| |
1475 | 1459 |
| |
1476 | 1460 |
| |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
1477 | 1464 |
| |
1478 | 1465 |
| |
1479 | 1466 |
| |
1480 | 1467 |
| |
1481 |
| - | |
| 1468 | + | |
1482 | 1469 |
| |
1483 | 1470 |
| |
1484 | 1471 |
| |
1485 | 1472 |
| |
1486 |
| - | |
1487 |
| - | |
| 1473 | + | |
1488 | 1474 |
| |
1489 | 1475 |
| |
1490 | 1476 |
| |
|
0 commit comments
Comments
(0)