|
PostgreSQL Source Code git master
|
#include "access/tupdesc.h"#include "access/xlog.h"#include "catalog/catalog.h"#include "catalog/pg_class.h"#include "catalog/pg_index.h"#include "catalog/pg_publication.h"#include "nodes/bitmapset.h"#include "partitioning/partdefs.h"#include "rewrite/prs2lock.h"#include "storage/block.h"#include "storage/relfilelocator.h"#include "storage/smgr.h"#include "utils/relcache.h"#include "utils/reltrigger.h"

Go to the source code of this file.
Data Structures | |
| struct | LockRelId |
| struct | LockInfoData |
| struct | RelationData |
| struct | ForeignKeyCacheInfo |
| struct | AutoVacOpts |
| struct | StdRdOptions |
| struct | ViewOptions |
Typedefs | |
| typedef struct LockRelId | LockRelId |
| typedef struct LockInfoData | LockInfoData |
| typedef LockInfoData * | LockInfo |
| typedef struct RelationData | RelationData |
| typedef struct ForeignKeyCacheInfo | ForeignKeyCacheInfo |
| typedef struct AutoVacOpts | AutoVacOpts |
| typedef enum StdRdOptIndexCleanup | StdRdOptIndexCleanup |
| typedef struct StdRdOptions | StdRdOptions |
| typedef enum ViewOptCheckOption | ViewOptCheckOption |
| typedef struct ViewOptions | ViewOptions |
Functions | |
| static SMgrRelation | RelationGetSmgr (Relation rel) |
| static void | RelationCloseSmgr (Relation relation) |
| void | RelationIncrementReferenceCount (Relation rel) |
| void | RelationDecrementReferenceCount (Relation rel) |
Definition at line 526 of file rel.h.
| #define IndexRelationGetNumberOfKeyAttributes | ( | relation | ) | ((relation)->rd_index->indnkeyatts) |
| #define RELATION_IS_LOCAL | ( | relation | ) |
| #define RELATION_IS_OTHER_TEMP | ( | relation | ) |
| #define RelationGetNamespace | ( | relation | ) | ((relation)->rd_rel->relnamespace) |
Definition at line 408 of file rel.h.
| #define RelationGetTargetBlock | ( | relation | ) | ( (relation)->rd_smgr != NULL ? (relation)->rd_smgr->smgr_targblock : InvalidBlockNumber ) |
Definition at line 610 of file rel.h.
| #define RelationGetTargetPageFreeSpace | ( | relation, | |
| defaultff | |||
| ) | (BLCKSZ * (100 - RelationGetFillFactor(relation, defaultff)) / 100) |
| #define RelationGetTargetPageUsage | ( | relation, | |
| defaultff | |||
| ) | (BLCKSZ * RelationGetFillFactor(relation, defaultff) / 100) |
| #define RelationGetToastTupleTarget | ( | relation, | |
| defaulttarg | |||
| ) |
Definition at line 366 of file rel.h.
| #define RelationHasCascadedCheckOption | ( | relation | ) |
| #define RelationHasCheckOption | ( | relation | ) |
| #define RelationHasLocalCheckOption | ( | relation | ) |
| #define RelationHasSecurityInvoker | ( | relation | ) |
Definition at line 447 of file rel.h.
| #define RelationIsAccessibleInLogicalDecoding | ( | relation | ) |
| #define RelationIsLogicallyLogged | ( | relation | ) |
| #define RelationIsMapped | ( | relation | ) |
| #define RelationIsPermanent | ( | relation | ) | ((relation)->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT) |
| #define RelationIsPopulated | ( | relation | ) | ((relation)->rd_rel->relispopulated) |
| #define RelationIsScannable | ( | relation | ) | ((relation)->rd_rel->relispopulated) |
| #define RelationIsSecurityView | ( | relation | ) |
Definition at line 437 of file rel.h.
| #define RelationIsUsedAsCatalogTable | ( | relation | ) |
Definition at line 397 of file rel.h.
| #define RelationNeedsWAL | ( | relation | ) |
| #define RelationUsesLocalBuffers | ( | relation | ) | ((relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP) |
| typedef struct AutoVacOpts AutoVacOpts |
| typedef struct LockInfoData LockInfoData |
| typedef struct RelationData RelationData |
| typedef struct StdRdOptions StdRdOptions |
| typedef struct ViewOptions ViewOptions |
| Enumerator | |
|---|---|
| STDRD_OPTION_VACUUM_INDEX_CLEANUP_AUTO | |
| STDRD_OPTION_VACUUM_INDEX_CLEANUP_OFF | |
| STDRD_OPTION_VACUUM_INDEX_CLEANUP_ON | |
Definition at line 334 of file rel.h.
| Enumerator | |
|---|---|
| VIEW_OPTION_CHECK_OPTION_NOT_SET | |
| VIEW_OPTION_CHECK_OPTION_LOCAL | |
| VIEW_OPTION_CHECK_OPTION_CASCADED | |
Definition at line 413 of file rel.h.
Definition at line 591 of file rel.h.
References fb(), RelationData::rd_smgr, smgrclose(), and smgrunpin().
Referenced by RelationCacheInvalidate(), RelationDestroyRelation(), RelationDropStorage(), and RelationInvalidateRelation().
Definition at line 2195 of file relcache.c.
References Assert, CurrentResourceOwner, IsBootstrapProcessingMode, RelationData::rd_refcnt, and ResourceOwnerForgetRelationRef().
Referenced by DestroyPartitionDirectory(), heap_endscan(), index_endscan(), RelationCacheInitializePhase3(), RelationClose(), and RelationFlushRelation().
|
inlinestatic |
Definition at line 576 of file rel.h.
References fb(), RelationData::rd_backend, RelationData::rd_locator, RelationData::rd_smgr, smgropen(), smgrpin(), and unlikely.
Referenced by _hash_alloc_buckets(), autoprewarm_database_main(), bt_index_check_callback(), FlushRelationBuffers(), FreeSpaceMapPrepareTruncateRel(), fsm_does_block_exist(), fsm_readbuf(), gistBuildCallback(), heapam_relation_copy_data(), index_build(), index_copy_data(), modify_rel_block(), pg_prewarm(), pg_truncate_visibility_map(), PrefetchBuffer(), read_rel_block_ll(), read_stream_begin_relation(), ReadBufferExtended(), RelationGetNumberOfBlocksInFork(), RelationPreTruncate(), RelationTruncate(), smgr_bulk_start_rel(), table_block_relation_size(), visibilitymap_prepare_truncate(), vm_extend(), and vm_readbuf().
Definition at line 2182 of file relcache.c.
References CurrentResourceOwner, IsBootstrapProcessingMode, RelationData::rd_refcnt, ResourceOwnerEnlarge(), and ResourceOwnerRememberRelationRef().
Referenced by heap_beginscan(), index_beginscan_internal(), PartitionDirectoryLookup(), RelationBuildLocalRelation(), RelationCacheInitializePhase3(), RelationFlushRelation(), and RelationIdGetRelation().