postgresql/src/include
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
..
access Refactor how VACUUM passes around its XID cutoffs. 2022-12-22 09:37:59 -08:00
backup Reduce basebackup_sink.h inclusion footprint 2022-10-12 09:42:20 +02:00
bootstrap Harmonize more lexer function parameter names. 2022-09-22 13:27:16 -07:00
catalog Add copyright notices to meson files 2022-12-20 07:54:39 -05:00
commands Refactor how VACUUM passes around its XID cutoffs. 2022-12-22 09:37:59 -08:00
common Remove hardcoded dependency to cryptohash type in the internals of SCRAM 2022-12-20 08:53:22 +09:00
datatype Fix overflow hazards in interval input and output conversions. 2022-04-02 16:12:29 -04:00
executor Rework query relation permission checking 2022-12-06 16:09:24 +01:00
fe_utils Revert 56-bit relfilenode change and follow-up commits. 2022-09-28 09:55:28 -04:00
foreign Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
jit Add central declarations for dlsym()ed symbols 2022-07-17 17:23:42 -07:00
lib Fix wording in comment 2022-11-17 13:17:19 +01:00
libpq Remove hardcoded dependency to cryptohash type in the internals of SCRAM 2022-12-20 08:53:22 +09:00
mb Convert json_in and jsonb_in to report errors softly. 2022-12-11 11:28:15 -05:00
nodes Add copyright notices to meson files 2022-12-20 07:54:39 -05:00
optimizer Add enable_presorted_aggregate GUC 2022-12-20 22:28:58 +13:00
parser Rework query relation permission checking 2022-12-06 16:09:24 +01:00
partitioning Move PartitioPruneInfo out of plan nodes into PlannedStmt 2022-12-01 12:56:21 +01:00
pch Add copyright notices to meson files 2022-12-20 07:54:39 -05:00
port mingw: Define PGDLLEXPORT as __declspec (dllexport) as done for msvc 2022-09-30 10:50:05 -07:00
portability Fix obsolete comments in instr_time.h. 2022-08-09 11:50:03 +12:00
postmaster Provide options for postmaster to kill child processes with SIGABRT. 2022-11-21 11:59:29 -05:00
regex Consistently use named parameters in regex code. 2022-09-19 15:10:24 -07:00
replication Avoid unnecessary streaming of transactions during logical replication. 2022-12-08 06:05:09 +05:30
rewrite Rework query relation permission checking 2022-12-06 16:09:24 +01:00
snowball Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
statistics Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
storage Add copyright notices to meson files 2022-12-20 07:54:39 -05:00
tcop Speed up creation of command completion tags 2022-12-16 10:31:25 +13:00
tsearch Replace link to Hunspell with the current homepage 2022-11-21 23:25:48 +01:00
utils Add palloc_aligned() to allow aligned memory allocations 2022-12-22 13:32:05 +13:00
.gitignore
c.h Add work-around for VA_ARGS_NARGS() on MSVC. 2022-12-22 18:32:10 +13:00
fmgr.h Convert json_in and jsonb_in to report errors softly. 2022-12-11 11:28:15 -05:00
funcapi.h Remove compatibility declarations for InitMaterializedSRF() 2022-10-18 10:44:02 +09:00
getopt_long.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
Makefile Move gramparse.h to src/backend/parser 2022-09-14 10:57:13 +07:00
meson.build Add copyright notices to meson files 2022-12-20 07:54:39 -05:00
miscadmin.h Remove AssertArg and AssertState 2022-10-28 09:19:06 +02:00
pg_config_ext.h.in
pg_config_ext.h.meson meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
pg_config_manual.h Remove our artificial PG_SOMAXCONN limit on listen queue length. 2022-08-23 10:15:06 -04:00
pg_config.h.in Remove configure probe for sockaddr_in6 and require AF_INET6. 2022-08-26 10:18:30 +12:00
pg_getopt.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pg_trace.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgstat.h Generate pg_stat_get*() functions for databases using macros 2022-12-07 09:11:48 +09:00
pgtar.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgtime.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
port.h pg_basebackup: Fix cross-platform tablespace relocation. 2022-10-21 08:21:55 -04:00
postgres_ext.h Move RelFileNumber declarations to common/relpath.h. 2022-09-27 12:01:57 -04:00
postgres_fe.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
postgres.h Simplify our Assert infrastructure a little. 2022-10-10 15:16:56 -04:00
windowapi.h Update copyright for 2022 2022-01-07 19:04:57 -05:00