PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | xl_relmap_update |
Macros | |
#define | XLOG_RELMAP_UPDATE 0x00 |
#define | MinSizeOfRelmapUpdate offsetof(xl_relmap_update, data) |
Typedefs | |
typedef struct xl_relmap_update | xl_relmap_update |
Functions | |
Oid | RelationMapOidToFilenode (Oid relationId, bool shared) |
Oid | RelationMapFilenodeToOid (Oid relationId, bool shared) |
void | RelationMapUpdateMap (Oid relationId, Oid fileNode, bool shared, bool immediate) |
void | RelationMapRemoveMapping (Oid relationId) |
void | RelationMapInvalidate (bool shared) |
void | RelationMapInvalidateAll (void) |
void | AtCCI_RelationMap (void) |
void | AtEOXact_RelationMap (bool isCommit, bool isParallelWorker) |
void | AtPrepare_RelationMap (void) |
void | CheckPointRelationMap (void) |
void | RelationMapFinishBootstrap (void) |
void | RelationMapInitialize (void) |
void | RelationMapInitializePhase2 (void) |
void | RelationMapInitializePhase3 (void) |
Size | EstimateRelationMapSpace (void) |
void | SerializeRelationMap (Size maxSize, char *startAddress) |
void | RestoreRelationMap (char *startAddress) |
void | relmap_redo (XLogReaderState *record) |
void | relmap_desc (StringInfo buf, XLogReaderState *record) |
const char * | relmap_identify (uint8 info) |
#define MinSizeOfRelmapUpdate offsetof(xl_relmap_update, data) |
Definition at line 35 of file relmapper.h.
Referenced by write_relmap_file().
#define XLOG_RELMAP_UPDATE 0x00 |
Definition at line 25 of file relmapper.h.
Referenced by relmap_desc(), relmap_identify(), relmap_redo(), and write_relmap_file().
typedef struct xl_relmap_update xl_relmap_update |
void AtCCI_RelationMap | ( | void | ) |
Definition at line 439 of file relmapper.c.
References merge_map_updates(), and RelMapFile::num_mappings.
Referenced by AtCCI_LocalCache().
Definition at line 476 of file relmapper.c.
References Assert, RelMapFile::num_mappings, and perform_relmap_update().
Referenced by AbortTransaction(), and CommitTransaction().
void AtPrepare_RelationMap | ( | void | ) |
Definition at line 523 of file relmapper.c.
References ereport, errcode(), errmsg(), ERROR, and RelMapFile::num_mappings.
Referenced by PrepareTransaction().
void CheckPointRelationMap | ( | void | ) |
Definition at line 546 of file relmapper.c.
References LW_SHARED, LWLockAcquire(), and LWLockRelease().
Referenced by CheckPointGuts().
Size EstimateRelationMapSpace | ( | void | ) |
Definition at line 646 of file relmapper.c.
Referenced by InitializeParallelDSM(), and SerializeRelationMap().
Definition at line 212 of file relmapper.c.
References active_local_updates, active_shared_updates, i, InvalidOid, local_map, RelMapping::mapfilenode, RelMapping::mapoid, RelMapFile::mappings, RelMapFile::num_mappings, and shared_map.
Referenced by RelidByRelfilenode().
void RelationMapFinishBootstrap | ( | void | ) |
Definition at line 560 of file relmapper.c.
References Assert, DatabasePath, InvalidOid, IsBootstrapProcessingMode, MyDatabaseId, MyDatabaseTableSpace, RelMapFile::num_mappings, and write_relmap_file().
Referenced by BootstrapModeMain().
void RelationMapInitialize | ( | void | ) |
Definition at line 584 of file relmapper.c.
References RelMapFile::magic, and RelMapFile::num_mappings.
Referenced by RelationCacheInitialize().
void RelationMapInitializePhase2 | ( | void | ) |
Definition at line 604 of file relmapper.c.
References IsBootstrapProcessingMode, and load_relmap_file().
Referenced by RelationCacheInitializePhase2().
void RelationMapInitializePhase3 | ( | void | ) |
Definition at line 625 of file relmapper.c.
References IsBootstrapProcessingMode, and load_relmap_file().
Referenced by RelationCacheInitializePhase3().
void RelationMapInvalidate | ( | bool | shared | ) |
Definition at line 403 of file relmapper.c.
References load_relmap_file(), RelMapFile::magic, and RELMAPPER_FILEMAGIC.
Referenced by LocalExecuteInvalidationMessage().
void RelationMapInvalidateAll | ( | void | ) |
Definition at line 425 of file relmapper.c.
References load_relmap_file(), RelMapFile::magic, and RELMAPPER_FILEMAGIC.
Referenced by RelationCacheInvalidate().
Definition at line 159 of file relmapper.c.
References active_local_updates, active_shared_updates, i, InvalidOid, local_map, RelMapping::mapfilenode, RelMapping::mapoid, RelMapFile::mappings, RelMapFile::num_mappings, and shared_map.
Referenced by pg_relation_filenode(), pg_relation_filepath(), RelationInitPhysicalAddr(), and swap_relation_files().
void RelationMapRemoveMapping | ( | Oid | relationId | ) |
Definition at line 373 of file relmapper.c.
References active_local_updates, elog, ERROR, i, RelMapping::mapoid, RelMapFile::mappings, and RelMapFile::num_mappings.
Referenced by finish_heap_swap().
Definition at line 261 of file relmapper.c.
References active_local_updates, active_shared_updates, apply_map_update(), elog, ERROR, GetCurrentTransactionNestLevel(), IsBootstrapProcessingMode, IsInParallelMode(), local_map, pending_local_updates, pending_shared_updates, and shared_map.
Referenced by formrdesc(), RelationBuildLocalRelation(), RelationSetNewRelfilenode(), and swap_relation_files().
void relmap_desc | ( | StringInfo | buf, |
XLogReaderState * | record | ||
) |
Definition at line 20 of file relmapdesc.c.
References appendStringInfo(), xl_relmap_update::dbid, xl_relmap_update::nbytes, xl_relmap_update::tsid, XLOG_RELMAP_UPDATE, XLogRecGetData, XLogRecGetInfo, and XLR_INFO_MASK.
const char* relmap_identify | ( | uint8 | info | ) |
void relmap_redo | ( | XLogReaderState * | record | ) |
Definition at line 1000 of file relmapper.c.
References Assert, xl_relmap_update::data, xl_relmap_update::dbid, elog, GetDatabasePath(), InvalidOid, xl_relmap_update::nbytes, PANIC, pfree(), xl_relmap_update::tsid, write_relmap_file(), XLOG_RELMAP_UPDATE, XLogRecGetData, XLogRecGetInfo, XLogRecHasAnyBlockRefs, and XLR_INFO_MASK.
void RestoreRelationMap | ( | char * | startAddress | ) |
Definition at line 674 of file relmapper.c.
References SerializedActiveRelMaps::active_local_updates, SerializedActiveRelMaps::active_shared_updates, elog, ERROR, and RelMapFile::num_mappings.
Referenced by ParallelWorkerMain().
void SerializeRelationMap | ( | Size | maxSize, |
char * | startAddress | ||
) |
Definition at line 657 of file relmapper.c.
References SerializedActiveRelMaps::active_local_updates, active_local_updates, SerializedActiveRelMaps::active_shared_updates, active_shared_updates, Assert, and EstimateRelationMapSpace().
Referenced by InitializeParallelDSM().