mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 02:53:51 +08:00
PG16: vacuum_set_xid_limits is now vacuum_get_cutoffs
PG16 refactors how VACUUM passes around its XID cutoffs. A new dedicated struct is now used by VACUUM to maintain the XID/MXID cutoffs such as FreezeLimit and OldestXmin. The vacuum_set_xid_limits() function is also now replaced with a a new vacuum_get_cutoffs() function that uses the new struct. postgres/postgres@4ce3afb8
This commit is contained in:
parent
f92cab8c2a
commit
beb3b39599
@ -585,7 +585,7 @@ pg_strtoint64(const char *str)
|
|||||||
NULL, \
|
NULL, \
|
||||||
multiXactCutoff, \
|
multiXactCutoff, \
|
||||||
NULL)
|
NULL)
|
||||||
#else
|
#elif PG16_LT
|
||||||
#define vacuum_set_xid_limits_compat(rel, \
|
#define vacuum_set_xid_limits_compat(rel, \
|
||||||
freeze_min_age, \
|
freeze_min_age, \
|
||||||
freeze_table_age, \
|
freeze_table_age, \
|
||||||
@ -607,6 +607,28 @@ pg_strtoint64(const char *str)
|
|||||||
freezeLimit, \
|
freezeLimit, \
|
||||||
multiXactCutoff); \
|
multiXactCutoff); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#else
|
||||||
|
#define vacuum_set_xid_limits_compat(rel, \
|
||||||
|
freezeMinAge, \
|
||||||
|
freezeTableAge, \
|
||||||
|
multixactFreezeMinAge, \
|
||||||
|
multixactFreezeTableAge, \
|
||||||
|
oldestXmin, \
|
||||||
|
freezeLimit, \
|
||||||
|
multiXactCutoff) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
struct VacuumCutoffs cutoffs; \
|
||||||
|
/* vacuum_get_cutoffs uses only the *_age members of the VacuumParams object */ \
|
||||||
|
VacuumParams params = { .freeze_min_age = freezeMinAge, \
|
||||||
|
.freeze_table_age = freezeTableAge, \
|
||||||
|
.multixact_freeze_min_age = multixactFreezeMinAge, \
|
||||||
|
.multixact_freeze_table_age = multixactFreezeTableAge }; \
|
||||||
|
vacuum_get_cutoffs(rel, ¶ms, &cutoffs); \
|
||||||
|
*(oldestXmin) = cutoffs.OldestXmin; \
|
||||||
|
*(freezeLimit) = cutoffs.FreezeLimit; \
|
||||||
|
*(multiXactCutoff) = cutoffs.MultiXactCutoff; \
|
||||||
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PG15_LT
|
#if PG15_LT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user