greenplumn appendonly_visimap_store 源码

  • 2022-08-18
  • 浏览 (350)

greenplumn appendonly_visimap_store 代码

文件路径:/src/include/access/appendonly_visimap_store.h

/*------------------------------------------------------------------------------
 *
 * appendonly_visimap_store
 *   responsible for storing and finding visimap entries.
 *
 * Copyright (c) 2013-Present VMware, Inc. or its affiliates.
 *
 *
 * IDENTIFICATION
 *	    src/include/access/appendonly_visimap_store.h
 *
 *------------------------------------------------------------------------------
*/
#ifndef APPENDONLY_VISIMAP_STORE_H
#define APPENDONLY_VISIMAP_STORE_H

#include "access/genam.h"
#include "access/skey.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/appendonly_visimap_entry.h"
#include "storage/lock.h"
#include "utils/rel.h"
#include "utils/snapshot.h"

/*
 * The visimap store is responsible for all
 * storage and scanning related activities of the visibility map.
 */
typedef struct AppendOnlyVisimapStore
{
	ScanKey		scanKeys;

	/*
	 * Visibility map relation for the ao table.
	 */
	Relation	visimapRelation;

	/*
	 * Index on the visibility map relation
	 */
	Relation	visimapIndex;

	/*
	 * Snapshot to use for meta data operations. No ownership
	 */
	Snapshot	snapshot;

	/*
	 * Memory context to use for allocations. No ownership of memory context.
	 */
	MemoryContext memoryContext;

} AppendOnlyVisimapStore;

void AppendOnlyVisimapStore_Init(
							AppendOnlyVisimapStore *visiMapStore,
							Oid visimapRelId,
							Oid visimapIdxId,
							LOCKMODE lockmode,
							Snapshot snapshot,
							MemoryContext memoryContext);

void AppendOnlyVisimapStore_Finish(
							  AppendOnlyVisimapStore *visiMapStore,
							  LOCKMODE lockmode);

bool AppendOnlyVisimapStore_Find(
							AppendOnlyVisimapStore *visiMapStore,
							int32 segmentFileNum,
							int64 firstRowNum,
							AppendOnlyVisimapEntry *visiMapEntry);

void AppendOnlyVisimapStore_Store(
							 AppendOnlyVisimapStore *visiMapStore,
							 AppendOnlyVisimapEntry *visiMapEntry);

void AppendOnlyVisimapStore_DeleteSegmentFile(
										 AppendOnlyVisimapStore *visiMapStore,
										 int segno);

int64 AppendOnlyVisimapStore_GetSegmentFileHiddenTupleCount(
													  AppendOnlyVisimapStore *visiMapStore,
													  AppendOnlyVisimapEntry *visiMapEntry,
													  int segno);

int64 AppendOnlyVisimapStore_GetRelationHiddenTupleCount(
												   AppendOnlyVisimapStore *visiMapStore,
												   AppendOnlyVisimapEntry *visiMapEntry);

/* Scan related functions */

extern SysScanDesc AppendOnlyVisimapStore_BeginScan(AppendOnlyVisimapStore *visiMapStore,
													int nkeys, ScanKey keys);

extern void AppendOnlyVisimapStore_EndScan(AppendOnlyVisimapStore *visiMapStore,
							   SysScanDesc indexScan);

extern bool AppendOnlyVisimapStore_GetNext(AppendOnlyVisimapStore *visiMapStore,
										   SysScanDesc indexScan,
										   ScanDirection scanDirection,
										   AppendOnlyVisimapEntry *visiMapEntry,
										   ItemPointerData *tupleTid);

#endif

相关信息

greenplumn 源码目录

相关文章

greenplumn amapi 源码

greenplumn amvalidate 源码

greenplumn aocs_compaction 源码

greenplumn aocssegfiles 源码

greenplumn aomd 源码

greenplumn aosegfiles 源码

greenplumn appendonly_compaction 源码

greenplumn appendonly_visimap 源码

greenplumn appendonly_visimap_entry 源码

greenplumn appendonlytid 源码

0  赞