forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit72b6098
committed
Avoid using tuple from syscache for update of pg_database.datfrozenxid
pg_database.datfrozenxid gets updated using an in-place update at theend of vacuum or autovacuum. Since96cdeae, as pg_database has a toastrelation, it is possible for a pg_database tuple to have toast valuesif there is a large set of ACLs in place. In such a case, the in-placeupdate would fail because of the flattening of the toast values done forthe catcache entry fetched. Instead of using a copy from the catcache,this changes the logic to fetch the copy of the tuple by directlyscanning pg_database.Note that before96cdeae, attempting to insert such a tuple topg_database would cause a "row is too big" error, so the end-of-vacuumproblem was not reachable.This issue has been originally fixed in947789f on v14~, and there havebeen reports about this problem on v12 and v13, causing failures at theend of VACUUM. This completes the fix on all the stable branches wherepg_database can use a toast table, down to 12.Author: Ashwin Agrawal, Junfeng YangDiscussion:https://postgr.es/m/DM5PR0501MB38800D9E4605BCA72DD35557CCE10@DM5PR0501MB3880.namprd05.prod.outlook.comDiscussion:https://postgr.es/m/Y70XNVbUWQsR2Car@paquier.xyzBackpatch-through: 121 parent2ad4abe commit72b6098
2 files changed
+23
-2
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5806 | 5806 |
| |
5807 | 5807 |
| |
5808 | 5808 |
| |
| 5809 | + | |
| 5810 | + | |
| 5811 | + | |
| 5812 | + | |
5809 | 5813 |
| |
5810 | 5814 |
| |
5811 | 5815 |
| |
|
Lines changed: 19 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
| |||
1343 | 1344 |
| |
1344 | 1345 |
| |
1345 | 1346 |
| |
| 1347 | + | |
1346 | 1348 |
| |
1347 | 1349 |
| |
1348 | 1350 |
| |
| |||
1460 | 1462 |
| |
1461 | 1463 |
| |
1462 | 1464 |
| |
1463 |
| - | |
1464 |
| - | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
1465 | 1481 |
| |
1466 | 1482 |
| |
| 1483 | + | |
1467 | 1484 |
| |
1468 | 1485 |
| |
1469 | 1486 |
| |
|
0 commit comments
Comments
(0)