postgresql/src/backend/access
Michael Paquier 947789f1f5 Avoid using tuple from syscache for update of pg_database.datfrozenxid
pg_database.datfrozenxid gets updated using an in-place update at the
end of vacuum or autovacuum.  Since 96cdeae, as pg_database has a toast
relation, it is possible for a pg_database tuple to have toast values
if there is a large set of ACLs in place.  In such a case, the in-place
update would fail because of the flattening of the toast values done for
the catcache entry fetched.  Instead of using a copy from the catcache,
this changes the logic to fetch the copy of the tuple by directly
scanning pg_database.

Per the lack of complaints on the matter, no backpatch is done.  Note
that before 96cdeae, attempting to insert such a tuple to pg_database
would cause a "row is too big" error, so the end-of-vacuum problem was
not reachable.

Author: Ashwin Agrawal, Junfeng Yang
Discussion: https://postgr.es/m/DM5PR0501MB38800D9E4605BCA72DD35557CCE10@DM5PR0501MB3880.namprd05.prod.outlook.com
2020-12-08 12:13:19 +09:00
..
brin Remove unused and deprecated strategy numbers from BRIN code 2020-11-16 17:25:41 +01:00
common Yet more elimination of dead stores and useless initializations. 2020-09-05 13:17:32 -04:00
gin Copy editing: fix a bunch of misspellings and poor wording. 2020-09-21 12:43:42 -04:00
gist Convert elog(LOG) calls to ereport() where appropriate 2020-12-04 14:25:23 +01:00
hash Invent "amadjustmembers" AM method for validating opclass members. 2020-08-01 17:12:47 -04:00
heap Avoid using tuple from syscache for update of pg_database.datfrozenxid 2020-12-08 12:13:19 +09:00
index snapshot scalability: Don't compute global horizons while building snapshots. 2020-08-12 16:03:49 -07:00
nbtree Convert elog(LOG) calls to ereport() where appropriate 2020-12-04 14:25:23 +01:00
rmgrdesc Fixup some appendStringInfo and appendPQExpBuffer calls 2020-10-15 20:35:17 +13:00
spgist Rename the "point is strictly above/below point" comparison operators. 2020-11-23 11:38:37 -05:00
table Improve handling of dropped relations for REINDEX DATABASE/SCHEMA/SYSTEM 2020-09-02 09:08:12 +09:00
tablesample Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30
transam Convert elog(LOG) calls to ereport() where appropriate 2020-12-04 14:25:23 +01:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00