postgresql/src/include/commands
Peter Geoghegan 4ce3afb82e Refactor how VACUUM passes around its XID cutoffs.
Use a dedicated struct for the XID/MXID cutoffs used by VACUUM, such as
FreezeLimit and OldestXmin.  This state is initialized in vacuum.c, and
then passed around by code from vacuumlazy.c to heapam.c freezing
related routines.  The new convention is that everybody works off of the
same cutoff state, which is passed around via pointers to const.

Also simplify some of the logic for dealing with frozen xmin in
heap_prepare_freeze_tuple: add dedicated "xmin_already_frozen" state to
clearly distinguish xmin XIDs that we're going to freeze from those that
were already frozen from before.  That way the routine's xmin handling
code is symmetrical with the existing xmax handling code.  This is
preparation for an upcoming commit that will add page level freezing.

Also refactor the control flow within FreezeMultiXactId(), while adding
stricter sanity checks.  We now test OldestXmin directly, instead of
using FreezeLimit as an inexact proxy for OldestXmin.  This is further
preparation for the page level freezing work, which will make the
function's caller cede control of page level freezing to the function
where appropriate (where heap_prepare_freeze_tuple sees a tuple that
happens to contain a MultiXactId in its xmax).

Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: Jeff Davis <pgsql@j-davis.com>
Discussion: https://postgr.es/m/CAH2-WznS9TxXmz2_=SY+SyJyDFbiOftKofM9=aDo68BbXNBUMA@mail.gmail.com
2022-12-22 09:37:59 -08:00
..
alter.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
async.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
cluster.h Harmonize heapam and tableam parameter names. 2022-09-19 16:46:23 -07:00
collationcmds.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
comment.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
conversioncmds.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
copy.h Add support for COPY TO callback functions 2022-10-11 11:45:52 +09:00
copyfrom_internal.h Rework query relation permission checking 2022-12-06 16:09:24 +01:00
createas.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dbcommands.h Database-level collation version tracking 2022-02-14 08:27:26 +01:00
dbcommands_xlog.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
defrem.h Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^31. 2022-11-04 10:39:52 -04:00
discard.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
event_trigger.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
explain.h autho_explain: Add GUC to log query parameters 2022-07-06 09:55:30 +09:00
extension.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
lockcmds.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
matview.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
policy.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
portalcmds.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
prepare.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
proclang.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
progress.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
publicationcmds.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
schemacmds.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
seclabel.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
sequence.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
subscriptioncmds.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
tablecmds.h Add grantable MAINTAIN privilege and pg_maintain role. 2022-12-13 17:33:28 -08:00
tablespace.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
trigger.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
typecmds.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
user.h Allow grant-level control of role inheritance behavior. 2022-08-25 10:06:02 -04:00
vacuum.h Refactor how VACUUM passes around its XID cutoffs. 2022-12-22 09:37:59 -08:00
view.h Update copyright for 2022 2022-01-07 19:04:57 -05:00