translation_unit
comment "/*----------------------------------------------------------"...
preproc_include
#include "#include"
string_literal
" "\""
string_content "postgres.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/multixact.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/multixact_internal.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/slru.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/twophase.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/twophase_rmgr.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/xlog.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/xloginsert.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "access/xlogutils.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "miscadmin.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "pg_trace.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "pgstat.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "postmaster/autovacuum.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/pmsignal.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/proc.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "storage/procarray.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/guc_hooks.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/injection_point.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/lsyscache.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "utils/memutils.h"
" "\""
comment "/*\n * Thresholds used to keep members disk usage in check wh"...
preproc_def
#define "#define"
identifier "MULTIXACT_MEMBER_LOW_THRESHOLD"
preproc_arg "UINT64CONST(2000000000)"
preproc_def
#define "#define"
identifier "MULTIXACT_MEMBER_HIGH_THRESHOLD"
preproc_arg "UINT64CONST(4000000000)"
function_definition (+32 nodes collapsed)
comment "/*\n * Links to shared-memory data structures for MultiXact c"...
declaration
storage_class_specifier
static "static"
type_identifier "SlruCtlData"
identifier "MultiXactOffsetCtlData"
; ";"
declaration
storage_class_specifier
static "static"
type_identifier "SlruCtlData"
identifier "MultiXactMemberCtlData"
; ";"
preproc_def
#define "#define"
identifier "MultiXactOffsetCtl"
preproc_arg "(&MultiXactOffsetCtlData)"
preproc_def
#define "#define"
identifier "MultiXactMemberCtl"
preproc_arg "(&MultiXactMemberCtlData)"
comment "/*\n * MultiXact state shared across all backends. All this "...
type_definition (+65 nodes collapsed)
comment "/*\n * Size of OldestMemberMXactId and OldestVisibleMXactId a"...
preproc_def
#define "#define"
identifier "MaxOldestSlot"
preproc_arg "(MaxBackends + max_prepared_xacts)"
comment "/* Pointers to the state data in shared memory */"
declaration
storage_class_specifier
static "static"
type_identifier "MultiXactStateData"
pointer_declarator
* "*"
identifier "MultiXactState"
; ";"
declaration
storage_class_specifier
static "static"
type_identifier "MultiXactId"
pointer_declarator
* "*"
identifier "OldestMemberMXactId"
; ";"
declaration
storage_class_specifier
static "static"
type_identifier "MultiXactId"
pointer_declarator
* "*"
identifier "OldestVisibleMXactId"
; ";"
comment "/*\n * Definitions for the backend-local MultiXactId cache.\n "...
type_definition (+30 nodes collapsed)
preproc_def
#define "#define"
identifier "MAX_CACHE_ENTRIES"
preproc_arg "256"
declaration
storage_class_specifier
static "static"
type_identifier "dclist_head"
init_declarator
identifier "MXactCache"
= "="
call_expression
identifier "DCLIST_STATIC_INIT"
argument_list
( "("
identifier "MXactCache"
) ")"
; ";"
declaration
storage_class_specifier
static "static"
type_identifier "MemoryContext"
init_declarator
identifier "MXactContext"
= "="
null
NULL "NULL"
; ";"
preproc_ifdef (+141 nodes collapsed)
comment "/* internal MultiXactId management */"
declaration
storage_class_specifier
static "static"
primitive_type "void"
function_declarator
identifier "MultiXactIdSetOldestVisible"
parameter_list
( "("
parameter_declaration
primitive_type "void"
) ")"
; ";"
declaration (+27 nodes collapsed)
declaration
storage_class_specifier
static "static"
type_identifier "MultiXactId"
function_declarator
identifier "GetNewMultiXactId"
parameter_list
( "("
parameter_declaration
primitive_type "int"
identifier "nmembers"
, ","
parameter_declaration
type_identifier "MultiXactOffset"
pointer_declarator
* "*"
identifier "offset"
) ")"
; ";"
comment "/* MultiXact cache management */"
declaration (+25 nodes collapsed)
declaration
storage_class_specifier
static "static"
type_identifier "MultiXactId"
function_declarator
identifier "mXactCacheGetBySet"
parameter_list
( "("
parameter_declaration
primitive_type "int"
identifier "nmembers"
, ","
parameter_declaration
type_identifier "MultiXactMember"
pointer_declarator
* "*"
identifier "members"
) ")"
; ";"
declaration (+21 nodes collapsed)
declaration (+23 nodes collapsed)
comment "/* management of SLRU infrastructure */"
declaration
storage_class_specifier
static "static"
primitive_type "bool"
function_declarator
identifier "MultiXactOffsetPagePrecedes"
parameter_list
( "("
parameter_declaration
type_identifier "int64"
identifier "page1"
, ","
parameter_declaration
type_identifier "int64"
identifier "page2"
) ")"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "bool"
function_declarator
identifier "MultiXactMemberPagePrecedes"
parameter_list
( "("
parameter_declaration
type_identifier "int64"
identifier "page1"
, ","
parameter_declaration
type_identifier "int64"
identifier "page2"
) ")"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "void"
function_declarator
identifier "ExtendMultiXactOffset"
parameter_list
( "("
parameter_declaration
type_identifier "MultiXactId"
identifier "multi"
) ")"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "void"
function_declarator
identifier "ExtendMultiXactMember"
parameter_list
( "("
parameter_declaration
type_identifier "MultiXactOffset"
identifier "offset"
, ","
parameter_declaration
primitive_type "int"
identifier "nmembers"
) ")"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "void"
function_declarator
identifier "SetOldestOffset"
parameter_list
( "("
parameter_declaration
primitive_type "void"
) ")"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "bool"
function_declarator
identifier "find_multixact_start"
parameter_list
( "("
parameter_declaration
type_identifier "MultiXactId"
identifier "multi"
, ","
parameter_declaration
type_identifier "MultiXactOffset"
pointer_declarator
* "*"
identifier "result"
) ")"
; ";"
declaration (+29 nodes collapsed)
comment "/*\n * MultiXactIdCreate\n *\t\tConstruct a MultiXactId represen"...
function_definition (+201 nodes collapsed)
comment "/*\n * MultiXactIdExpand\n *\t\tAdd a TransactionId to a pre-exi"...
function_definition (+512 nodes collapsed)
comment "/*\n * MultiXactIdIsRunning\n *\t\tReturns whether a MultiXactId"...
function_definition (+269 nodes collapsed)
comment "/*\n * MultiXactIdSetOldestMember\n *\t\tSave the oldest MultiXa"...
function_definition (+107 nodes collapsed)
comment "/*\n * MultiXactIdSetOldestVisible\n *\t\tSave the oldest MultiX"...
function_definition (+170 nodes collapsed)
comment "/*\n * ReadNextMultiXactId\n *\t\tReturn the next MultiXactId to"...
function_definition (+63 nodes collapsed)
comment "/*\n * ReadMultiXactIdRange\n *\t\tGet the range of IDs that may"...
function_definition (+99 nodes collapsed)
comment "/*\n * MultiXactIdCreateFromMembers\n *\t\tMake a new MultiXactI"...
function_definition (+368 nodes collapsed)
comment "/*\n * RecordNewMultiXact\n *\t\tWrite info about a new multixac"...
function_definition (+877 nodes collapsed)
comment "/*\n * GetNewMultiXactId\n *\t\tGet the next MultiXactId.\n *\n * "...
function_definition (+698 nodes collapsed)
comment "/*\n * GetMultiXactIdMembers\n *\t\tReturn the set of MultiXactM"...
function_definition (+1137 nodes collapsed)
comment "/*\n * mxactMemberComparator\n *\t\tqsort comparison function fo"...
function_definition (+143 nodes collapsed)
comment "/*\n * mXactCacheGetBySet\n *\t\treturns a MultiXactId from the "...
function_definition (+210 nodes collapsed)
comment "/*\n * mXactCacheGetById\n *\t\treturns the composing MultiXactM"...
function_definition (+231 nodes collapsed)
comment "/*\n * mXactCachePut\n *\t\tAdd a new MultiXactId and its compos"...
function_definition (+310 nodes collapsed)
function_definition (+114 nodes collapsed)
function_definition (+216 nodes collapsed)
comment "/*\n * AtEOXact_MultiXact\n *\t\tHandle transaction end for Mult"...
function_definition (+51 nodes collapsed)
comment "/*\n * AtPrepare_MultiXact\n *\t\tSave multixact state at 2PC tr"...
function_definition (+55 nodes collapsed)
comment "/*\n * PostPrepare_MultiXact\n *\t\tClean up after successful PR"...
function_definition (+124 nodes collapsed)
comment "/*\n * multixact_twophase_recover\n *\t\tRecover the state of a "...
function_definition (+90 nodes collapsed)
comment "/*\n * multixact_twophase_postcommit\n *\t\tSimilar to AtEOXact_"...
function_definition (+67 nodes collapsed)
comment "/*\n * multixact_twophase_postabort\n *\t\tThis is actually just"...
function_definition (+41 nodes collapsed)
comment "/*\n * Initialization of shared memory for MultiXact. We use"...
function_definition (+71 nodes collapsed)
function_definition (+202 nodes collapsed)
comment "/*\n * GUC check_hook for multixact_offset_buffers\n */"
function_definition (+41 nodes collapsed)
comment "/*\n * GUC check_hook for multixact_member_buffers\n */"
function_definition (+41 nodes collapsed)
comment "/*\n * This func must be called ONCE on system install. It c"...
function_definition (+33 nodes collapsed)
comment "/*\n * This must be called ONCE during postmaster or standalo"...
function_definition (+96 nodes collapsed)
comment "/*\n * This must be called ONCE at the end of startup/recover"...
function_definition (+569 nodes collapsed)
comment "/*\n * Get the MultiXact data to save in a checkpoint record\n"...
function_definition (+134 nodes collapsed)
comment "/*\n * Perform a checkpoint --- either during shutdown, or on"...
function_definition (+49 nodes collapsed)
comment "/*\n * Set the next-to-be-assigned MultiXactId and offset\n *\n"...
function_definition (+72 nodes collapsed)
comment "/*\n * Determine the last safe MultiXactId to allocate given "...
function_definition (+502 nodes collapsed)
comment "/*\n * Ensure the next-to-be-assigned MultiXactId is at least"...
function_definition
primitive_type "void"
function_declarator
identifier "MultiXactAdvanceNextMXact"
parameter_list
( "("
parameter_declaration
type_identifier "MultiXactId"
identifier "minMulti"
, ","
parameter_declaration
type_identifier "MultiXactOffset"
identifier "minMultiOffset"
) ")"
compound_statement
{ "{"
expression_statement
call_expression
identifier "LWLockAcquire"
argument_list
( "("
identifier "MultiXactGenLock"
, ","
identifier "LW_EXCLUSIVE"
) ")"
; ";"
if_statement (+43 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_expression
identifier "MultiXactState"
-> "->"
field_identifier "nextOffset"
< "<"
identifier "minMultiOffset"
) ")"
compound_statement
{ "{"
expression_statement
call_expression
identifier "debug_elog3"
argument_list
( "("
identifier "DEBUG2"
, ","
concatenated_string
string_literal
" "\""
string_content "MultiXact: setting next offset to %"
" "\""
identifier "PRIU64"
, ","
identifier "minMultiOffset"
) ")"
; ";"
expression_statement
assignment_expression
field_expression
identifier "MultiXactState"
-> "->"
field_identifier "nextOffset"
= "="
identifier "minMultiOffset"
; ";"
} "}"
expression_statement
call_expression
identifier "LWLockRelease"
argument_list
( "("
identifier "MultiXactGenLock"
) ")"
; ";"
} "}"
comment "/*\n * Update our oldestMultiXactId value, but only if it's m"...
function_definition (+51 nodes collapsed)
comment "/*\n * Make sure that MultiXactOffset has room for a newly-al"...
function_definition (+114 nodes collapsed)
comment "/*\n * Make sure that MultiXactMember has room for the member"...
function_definition (+186 nodes collapsed)
comment "/*\n * GetOldestMultiXactId\n *\n * Return the oldest MultiXact"...
function_definition (+176 nodes collapsed)
comment "/*\n * Calculate the oldest member offset and install it in M"...
function_definition (+257 nodes collapsed)
comment "/*\n * Find the starting offset of the given MultiXactId.\n *\n"...
function_definition (+196 nodes collapsed)
comment "/*\n * GetMultiXactInfo\n *\n * Returns information about the c"...
function_definition (+125 nodes collapsed)
comment "/*\n * Multixact members can be removed once the multixacts t"...
function_definition (+148 nodes collapsed)
type_definition
typedef "typedef"
struct_specifier
struct "struct"
type_identifier "mxtruncinfo"
field_declaration_list
{ "{"
field_declaration
type_identifier "int64"
field_identifier "earliestExistingPage"
; ";"
} "}"
type_identifier "mxtruncinfo"
; ";"
comment "/*\n * SlruScanDirectory callback\n *\t\tThis callback determine"...
function_definition (+92 nodes collapsed)
comment "/*\n * Delete members segments [oldest, newOldest)\n */"
function_definition (+34 nodes collapsed)
comment "/*\n * Delete offsets segments [oldest, newOldest)\n */"
function_definition (+40 nodes collapsed)
comment "/*\n * Remove all MultiXactOffset and MultiXactMember segment"...
function_definition (+637 nodes collapsed)
comment "/*\n * Decide whether a MultiXactOffset page number is \"older"...
function_definition (+109 nodes collapsed)
comment "/*\n * Decide whether a MultiXactMember page number is \"older"...
function_definition (+26 nodes collapsed)
comment "/*\n * Decide which of two MultiXactIds is earlier.\n *\n * XXX"...
function_definition (+45 nodes collapsed)
comment "/*\n * MultiXactIdPrecedesOrEquals -- is multi1 logically <= "...
function_definition (+45 nodes collapsed)
comment "/*\n * Write a TRUNCATE xlog record\n *\n * We must flush the x"...
function_definition (+124 nodes collapsed)
comment "/*\n * MULTIXACT resource manager's routines\n */"
function_definition (+599 nodes collapsed)
comment "/*\n * Entrypoint for sync.c to sync offsets files.\n */"
function_definition (+36 nodes collapsed)
comment "/*\n * Entrypoint for sync.c to sync members files.\n */"
function_definition (+36 nodes collapsed)