forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc0ee694
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 parent274185d commitc0ee694
2 files changed
+23
-2
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5837 | 5837 |
| |
5838 | 5838 |
| |
5839 | 5839 |
| |
| 5840 | + | |
| 5841 | + | |
| 5842 | + | |
| 5843 | + | |
5840 | 5844 |
| |
5841 | 5845 |
| |
5842 | 5846 |
| |
|
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 |
| |
| |||
1294 | 1295 |
| |
1295 | 1296 |
| |
1296 | 1297 |
| |
| 1298 | + | |
1297 | 1299 |
| |
1298 | 1300 |
| |
1299 | 1301 |
| |
| |||
1411 | 1413 |
| |
1412 | 1414 |
| |
1413 | 1415 |
| |
1414 |
| - | |
1415 |
| - | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
1416 | 1432 |
| |
1417 | 1433 |
| |
| 1434 | + | |
1418 | 1435 |
| |
1419 | 1436 |
| |
1420 | 1437 |
| |
|
0 commit comments
Comments
(0)