PostgreSQL Source Code git master
Data Structures | Macros | Typedefs | Functions
block.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct   BlockIdData
 

Macros

#define  InvalidBlockNumber   ((BlockNumber) 0xFFFFFFFF)
 
#define  MaxBlockNumber   ((BlockNumber) 0xFFFFFFFE)
 

Typedefs

typedef uint32  BlockNumber
 
typedef struct BlockIdData  BlockIdData
 
typedef BlockIdDataBlockId
 

Functions

static bool  BlockNumberIsValid (BlockNumber blockNumber)
 
static void  BlockIdSet (BlockIdData *blockId, BlockNumber blockNumber)
 
static bool  BlockIdEquals (const BlockIdData *blockId1, const BlockIdData *blockId2)
 
static BlockNumber  BlockIdGetBlockNumber (const BlockIdData *blockId)
 

Macro Definition Documentation

InvalidBlockNumber

#define InvalidBlockNumber   ((BlockNumber) 0xFFFFFFFF)

Definition at line 33 of file block.h.

MaxBlockNumber

#define MaxBlockNumber   ((BlockNumber) 0xFFFFFFFE)

Definition at line 35 of file block.h.

Typedef Documentation

BlockId

typedef BlockIdData* BlockId

Definition at line 59 of file block.h.

BlockIdData

typedef struct BlockIdData BlockIdData

BlockNumber

Definition at line 31 of file block.h.

Function Documentation

BlockIdEquals()

static bool BlockIdEquals ( const BlockIdDatablockId1,
const BlockIdDatablockId2 
)
inlinestatic

Definition at line 92 of file block.h.

93{
94 return (blockId1->bi_hi == blockId2->bi_hi &&
95 blockId1->bi_lo == blockId2->bi_lo);
96}
uint16 bi_lo
Definition: block.h:56
uint16 bi_hi
Definition: block.h:55

References BlockIdData::bi_hi, and BlockIdData::bi_lo.

BlockIdGetBlockNumber()

static BlockNumber BlockIdGetBlockNumber ( const BlockIdDatablockId )
inlinestatic

Definition at line 103 of file block.h.

104{
105 return (((BlockNumber) blockId->bi_hi) << 16) | ((BlockNumber) blockId->bi_lo);
106}
uint32 BlockNumber
Definition: block.h:31

References BlockIdData::bi_hi, and BlockIdData::bi_lo.

Referenced by gin_check_posting_tree_parent_keys_consistency(), gin_desc(), ginRedoInsert(), and ItemPointerGetBlockNumberNoCheck().

BlockIdSet()

static void BlockIdSet ( BlockIdDatablockId,
BlockNumber  blockNumber 
)
inlinestatic

Definition at line 81 of file block.h.

82{
83 blockId->bi_hi = blockNumber >> 16;
84 blockId->bi_lo = blockNumber & 0xffff;
85}

References BlockIdData::bi_hi, and BlockIdData::bi_lo.

Referenced by ginPlaceToPage(), ItemPointerSet(), ItemPointerSetBlockNumber(), and ItemPointerSetInvalid().

BlockNumberIsValid()

static bool BlockNumberIsValid ( BlockNumber  blockNumber )
inlinestatic

Definition at line 71 of file block.h.

72{
73 return blockNumber != InvalidBlockNumber;
74}
#define InvalidBlockNumber
Definition: block.h:33

References InvalidBlockNumber.

Referenced by _bt_getbuf(), _bt_insert_parent(), _bt_insertonpg(), _bt_parallel_release(), _bt_relandgetbuf(), _bt_unlink_halfdead_page(), _hash_addovflpage(), _hash_doinsert(), _hash_finish_split(), _hash_first(), _hash_freeovflpage(), _hash_next(), _hash_readnext(), _hash_readprev(), _hash_splitbucket(), _hash_squeezebucket(), autovac_report_workitem(), BitmapHeapScanNextBlock(), bottomup_sort_and_shrink(), brin_bloom_get_ndistinct(), brinRevmapDesummarizeRange(), bt_child_highkey_check(), btree_xlog_unlink_page(), DropRelationBuffers(), DropRelationsAllBuffers(), entryGetItem(), fsm_does_block_exist(), GetFileBackupMethod(), hash_xlog_add_ovfl_page(), hashbucketcleanup(), heapam_scan_sample_next_block(), main(), pg_truncate_visibility_map(), pg_wal_summary_contents(), PredicateLockPageSplit(), PrefetchBuffer(), PrefetchSharedBuffer(), RelationAddBlocks(), RelationTruncate(), smgr_redo(), smgrDoPendingSyncs(), and vacuum_error_callback().

AltStyle によって変換されたページ (->オリジナル) /