Update columnar_vacuum_rel to handle new 'all_frozen' parameter for PostgreSQL 18+

m3hm3t/pg18_support
Mehmet Yilmaz 2025-07-14 10:18:26 +00:00
parent 9817800aac
commit 488a298189
1 changed files with 5 additions and 1 deletions

View File

@ -1123,9 +1123,13 @@ columnar_vacuum_rel(Relation rel, VacuumParams *params,
/* for PG 18+, vac_update_relstats gained a new “all_frozen” param */ /* for PG 18+, vac_update_relstats gained a new “all_frozen” param */
#if PG_VERSION_NUM >= PG_VERSION_18 #if PG_VERSION_NUM >= PG_VERSION_18
/* all frozen pages are always 0, because columnar stripes never store XIDs */
BlockNumber new_rel_allfrozen = 0;
vac_update_relstats(rel, new_rel_pages, new_live_tuples, vac_update_relstats(rel, new_rel_pages, new_live_tuples,
new_rel_allvisible, /* allvisible */ new_rel_allvisible, /* allvisible */
0, /* all_frozen */ new_rel_allfrozen, /* all_frozen */
nindexes > 0, nindexes > 0,
newRelFrozenXid, newRelminMxid, newRelFrozenXid, newRelminMxid,
&frozenxid_updated, &minmulti_updated, &frozenxid_updated, &minmulti_updated,