mirror of
https://github.com/postgres/postgres.git
synced 2025-08-21 10:42:50 +03:00
Phase 2 pgindent run for v12.
Switch to 2.1 version of pg_bsd_indent. This formats multiline function declarations "correctly", that is with additional lines of parameter declarations indented to match where the first line's left parenthesis is. Discussion: https://postgr.es/m/CAEepm=0P3FeTXRcU5B2W3jv3PgRVZ-kGUXLGfd42FFhUROO3ug@mail.gmail.com
This commit is contained in:
@@ -28,9 +28,9 @@ typedef struct OpFamilyOpFuncGroup
|
||||
/* Functions in access/index/amvalidate.c */
|
||||
extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *proclist);
|
||||
extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact,
|
||||
int minargs, int maxargs,...);
|
||||
int minargs, int maxargs,...);
|
||||
extern bool check_amop_signature(Oid opno, Oid restype,
|
||||
Oid lefttype, Oid righttype);
|
||||
Oid lefttype, Oid righttype);
|
||||
extern bool opfamily_can_sort_type(Oid opfamilyoid, Oid datatypeoid);
|
||||
|
||||
#endif /* AMVALIDATE_H */
|
||||
|
@@ -85,23 +85,23 @@ typedef struct BrinDesc
|
||||
extern BrinDesc *brin_build_desc(Relation rel);
|
||||
extern void brin_free_desc(BrinDesc *bdesc);
|
||||
extern IndexBuildResult *brinbuild(Relation heap, Relation index,
|
||||
struct IndexInfo *indexInfo);
|
||||
struct IndexInfo *indexInfo);
|
||||
extern void brinbuildempty(Relation index);
|
||||
extern bool brininsert(Relation idxRel, Datum *values, bool *nulls,
|
||||
ItemPointer heaptid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
ItemPointer heaptid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
extern IndexScanDesc brinbeginscan(Relation r, int nkeys, int norderbys);
|
||||
extern int64 bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm);
|
||||
extern void brinrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys,
|
||||
ScanKey orderbys, int norderbys);
|
||||
ScanKey orderbys, int norderbys);
|
||||
extern void brinendscan(IndexScanDesc scan);
|
||||
extern IndexBulkDeleteResult *brinbulkdelete(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
extern IndexBulkDeleteResult *brinvacuumcleanup(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats);
|
||||
IndexBulkDeleteResult *stats);
|
||||
extern bytea *brinoptions(Datum reloptions, bool validate);
|
||||
|
||||
/* brin_validate.c */
|
||||
|
@@ -14,24 +14,24 @@
|
||||
#include "access/brin_revmap.h"
|
||||
|
||||
extern bool brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
|
||||
BrinRevmap *revmap, BlockNumber heapBlk,
|
||||
Buffer oldbuf, OffsetNumber oldoff,
|
||||
const BrinTuple *origtup, Size origsz,
|
||||
const BrinTuple *newtup, Size newsz,
|
||||
bool samepage);
|
||||
BrinRevmap *revmap, BlockNumber heapBlk,
|
||||
Buffer oldbuf, OffsetNumber oldoff,
|
||||
const BrinTuple *origtup, Size origsz,
|
||||
const BrinTuple *newtup, Size newsz,
|
||||
bool samepage);
|
||||
extern bool brin_can_do_samepage_update(Buffer buffer, Size origsz,
|
||||
Size newsz);
|
||||
Size newsz);
|
||||
extern OffsetNumber brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
|
||||
BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk,
|
||||
BrinTuple *tup, Size itemsz);
|
||||
BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk,
|
||||
BrinTuple *tup, Size itemsz);
|
||||
|
||||
extern void brin_page_init(Page page, uint16 type);
|
||||
extern void brin_metapage_init(Page page, BlockNumber pagesPerRange,
|
||||
uint16 version);
|
||||
uint16 version);
|
||||
|
||||
extern bool brin_start_evacuating_page(Relation idxRel, Buffer buf);
|
||||
extern void brin_evacuate_page(Relation idxRel, BlockNumber pagesPerRange,
|
||||
BrinRevmap *revmap, Buffer buf);
|
||||
BrinRevmap *revmap, Buffer buf);
|
||||
|
||||
extern void brin_page_cleanup(Relation idxrel, Buffer buf);
|
||||
|
||||
|
@@ -24,18 +24,18 @@
|
||||
typedef struct BrinRevmap BrinRevmap;
|
||||
|
||||
extern BrinRevmap *brinRevmapInitialize(Relation idxrel,
|
||||
BlockNumber *pagesPerRange, Snapshot snapshot);
|
||||
BlockNumber *pagesPerRange, Snapshot snapshot);
|
||||
extern void brinRevmapTerminate(BrinRevmap *revmap);
|
||||
|
||||
extern void brinRevmapExtend(BrinRevmap *revmap,
|
||||
BlockNumber heapBlk);
|
||||
BlockNumber heapBlk);
|
||||
extern Buffer brinLockRevmapPageForUpdate(BrinRevmap *revmap,
|
||||
BlockNumber heapBlk);
|
||||
BlockNumber heapBlk);
|
||||
extern void brinSetHeapBlockItemptr(Buffer rmbuf, BlockNumber pagesPerRange,
|
||||
BlockNumber heapBlk, ItemPointerData tid);
|
||||
BlockNumber heapBlk, ItemPointerData tid);
|
||||
extern BrinTuple *brinGetTupleForHeapBlock(BrinRevmap *revmap,
|
||||
BlockNumber heapBlk, Buffer *buf, OffsetNumber *off,
|
||||
Size *size, int mode, Snapshot snapshot);
|
||||
BlockNumber heapBlk, Buffer *buf, OffsetNumber *off,
|
||||
Size *size, int mode, Snapshot snapshot);
|
||||
extern bool brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk);
|
||||
|
||||
#endif /* BRIN_REVMAP_H */
|
||||
|
@@ -84,19 +84,19 @@ typedef struct BrinTuple
|
||||
|
||||
|
||||
extern BrinTuple *brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno,
|
||||
BrinMemTuple *tuple, Size *size);
|
||||
BrinMemTuple *tuple, Size *size);
|
||||
extern BrinTuple *brin_form_placeholder_tuple(BrinDesc *brdesc,
|
||||
BlockNumber blkno, Size *size);
|
||||
BlockNumber blkno, Size *size);
|
||||
extern void brin_free_tuple(BrinTuple *tuple);
|
||||
extern BrinTuple *brin_copy_tuple(BrinTuple *tuple, Size len,
|
||||
BrinTuple *dest, Size *destsz);
|
||||
BrinTuple *dest, Size *destsz);
|
||||
extern bool brin_tuples_equal(const BrinTuple *a, Size alen,
|
||||
const BrinTuple *b, Size blen);
|
||||
const BrinTuple *b, Size blen);
|
||||
|
||||
extern BrinMemTuple *brin_new_memtuple(BrinDesc *brdesc);
|
||||
extern BrinMemTuple *brin_memtuple_initialize(BrinMemTuple *dtuple,
|
||||
BrinDesc *brdesc);
|
||||
BrinDesc *brdesc);
|
||||
extern BrinMemTuple *brin_deform_tuple(BrinDesc *brdesc,
|
||||
BrinTuple *tuple, BrinMemTuple *dMemtuple);
|
||||
BrinTuple *tuple, BrinMemTuple *dMemtuple);
|
||||
|
||||
#endif /* BRIN_TUPLE_H */
|
||||
|
@@ -36,7 +36,7 @@ typedef struct xl_clog_truncate
|
||||
} xl_clog_truncate;
|
||||
|
||||
extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,
|
||||
TransactionId *subxids, XidStatus status, XLogRecPtr lsn);
|
||||
TransactionId *subxids, XidStatus status, XLogRecPtr lsn);
|
||||
extern XidStatus TransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn);
|
||||
|
||||
extern Size CLOGShmemBuffers(void);
|
||||
|
@@ -20,15 +20,15 @@
|
||||
extern PGDLLIMPORT bool track_commit_timestamp;
|
||||
|
||||
extern bool check_track_commit_timestamp(bool *newval, void **extra,
|
||||
GucSource source);
|
||||
GucSource source);
|
||||
|
||||
extern void TransactionTreeSetCommitTsData(TransactionId xid, int nsubxids,
|
||||
TransactionId *subxids, TimestampTz timestamp,
|
||||
RepOriginId nodeid, bool write_xlog);
|
||||
TransactionId *subxids, TimestampTz timestamp,
|
||||
RepOriginId nodeid, bool write_xlog);
|
||||
extern bool TransactionIdGetCommitTsData(TransactionId xid,
|
||||
TimestampTz *ts, RepOriginId *nodeid);
|
||||
TimestampTz *ts, RepOriginId *nodeid);
|
||||
extern TransactionId GetLatestCommitTsData(TimestampTz *ts,
|
||||
RepOriginId *nodeid);
|
||||
RepOriginId *nodeid);
|
||||
|
||||
extern Size CommitTsShmemBuffers(void);
|
||||
extern Size CommitTsShmemSize(void);
|
||||
@@ -42,7 +42,7 @@ extern void CheckPointCommitTs(void);
|
||||
extern void ExtendCommitTs(TransactionId newestXact);
|
||||
extern void TruncateCommitTs(TransactionId oldestXact);
|
||||
extern void SetCommitTsLimit(TransactionId oldestXact,
|
||||
TransactionId newestXact);
|
||||
TransactionId newestXact);
|
||||
extern void AdvanceOldestCommitTsXid(TransactionId oldestXact);
|
||||
|
||||
/* XLOG stuff */
|
||||
|
@@ -132,86 +132,86 @@ extern Relation index_open(Oid relationId, LOCKMODE lockmode);
|
||||
extern void index_close(Relation relation, LOCKMODE lockmode);
|
||||
|
||||
extern bool index_insert(Relation indexRelation,
|
||||
Datum *values, bool *isnull,
|
||||
ItemPointer heap_t_ctid,
|
||||
Relation heapRelation,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
Datum *values, bool *isnull,
|
||||
ItemPointer heap_t_ctid,
|
||||
Relation heapRelation,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
|
||||
extern IndexScanDesc index_beginscan(Relation heapRelation,
|
||||
Relation indexRelation,
|
||||
Snapshot snapshot,
|
||||
int nkeys, int norderbys);
|
||||
Relation indexRelation,
|
||||
Snapshot snapshot,
|
||||
int nkeys, int norderbys);
|
||||
extern IndexScanDesc index_beginscan_bitmap(Relation indexRelation,
|
||||
Snapshot snapshot,
|
||||
int nkeys);
|
||||
Snapshot snapshot,
|
||||
int nkeys);
|
||||
extern void index_rescan(IndexScanDesc scan,
|
||||
ScanKey keys, int nkeys,
|
||||
ScanKey orderbys, int norderbys);
|
||||
ScanKey keys, int nkeys,
|
||||
ScanKey orderbys, int norderbys);
|
||||
extern void index_endscan(IndexScanDesc scan);
|
||||
extern void index_markpos(IndexScanDesc scan);
|
||||
extern void index_restrpos(IndexScanDesc scan);
|
||||
extern Size index_parallelscan_estimate(Relation indexrel, Snapshot snapshot);
|
||||
extern void index_parallelscan_initialize(Relation heaprel, Relation indexrel,
|
||||
Snapshot snapshot, ParallelIndexScanDesc target);
|
||||
Snapshot snapshot, ParallelIndexScanDesc target);
|
||||
extern void index_parallelrescan(IndexScanDesc scan);
|
||||
extern IndexScanDesc index_beginscan_parallel(Relation heaprel,
|
||||
Relation indexrel, int nkeys, int norderbys,
|
||||
ParallelIndexScanDesc pscan);
|
||||
Relation indexrel, int nkeys, int norderbys,
|
||||
ParallelIndexScanDesc pscan);
|
||||
extern ItemPointer index_getnext_tid(IndexScanDesc scan,
|
||||
ScanDirection direction);
|
||||
ScanDirection direction);
|
||||
struct TupleTableSlot;
|
||||
extern bool index_fetch_heap(IndexScanDesc scan, struct TupleTableSlot *slot);
|
||||
extern bool index_getnext_slot(IndexScanDesc scan, ScanDirection direction,
|
||||
struct TupleTableSlot *slot);
|
||||
struct TupleTableSlot *slot);
|
||||
extern int64 index_getbitmap(IndexScanDesc scan, TIDBitmap *bitmap);
|
||||
|
||||
extern IndexBulkDeleteResult *index_bulk_delete(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
extern IndexBulkDeleteResult *index_vacuum_cleanup(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats);
|
||||
IndexBulkDeleteResult *stats);
|
||||
extern bool index_can_return(Relation indexRelation, int attno);
|
||||
extern RegProcedure index_getprocid(Relation irel, AttrNumber attnum,
|
||||
uint16 procnum);
|
||||
uint16 procnum);
|
||||
extern FmgrInfo *index_getprocinfo(Relation irel, AttrNumber attnum,
|
||||
uint16 procnum);
|
||||
uint16 procnum);
|
||||
extern void index_store_float8_orderby_distances(IndexScanDesc scan,
|
||||
Oid *orderByTypes, double *distances,
|
||||
bool recheckOrderBy);
|
||||
Oid *orderByTypes, double *distances,
|
||||
bool recheckOrderBy);
|
||||
|
||||
/*
|
||||
* index access method support routines (in genam.c)
|
||||
*/
|
||||
extern IndexScanDesc RelationGetIndexScan(Relation indexRelation,
|
||||
int nkeys, int norderbys);
|
||||
int nkeys, int norderbys);
|
||||
extern void IndexScanEnd(IndexScanDesc scan);
|
||||
extern char *BuildIndexValueDescription(Relation indexRelation,
|
||||
Datum *values, bool *isnull);
|
||||
Datum *values, bool *isnull);
|
||||
extern TransactionId index_compute_xid_horizon_for_tuples(Relation irel,
|
||||
Relation hrel,
|
||||
Buffer ibuf,
|
||||
OffsetNumber *itemnos,
|
||||
int nitems);
|
||||
Relation hrel,
|
||||
Buffer ibuf,
|
||||
OffsetNumber *itemnos,
|
||||
int nitems);
|
||||
|
||||
/*
|
||||
* heap-or-index access to system catalogs (in genam.c)
|
||||
*/
|
||||
extern SysScanDesc systable_beginscan(Relation heapRelation,
|
||||
Oid indexId,
|
||||
bool indexOK,
|
||||
Snapshot snapshot,
|
||||
int nkeys, ScanKey key);
|
||||
Oid indexId,
|
||||
bool indexOK,
|
||||
Snapshot snapshot,
|
||||
int nkeys, ScanKey key);
|
||||
extern HeapTuple systable_getnext(SysScanDesc sysscan);
|
||||
extern bool systable_recheck_tuple(SysScanDesc sysscan, HeapTuple tup);
|
||||
extern void systable_endscan(SysScanDesc sysscan);
|
||||
extern SysScanDesc systable_beginscan_ordered(Relation heapRelation,
|
||||
Relation indexRelation,
|
||||
Snapshot snapshot,
|
||||
int nkeys, ScanKey key);
|
||||
Relation indexRelation,
|
||||
Snapshot snapshot,
|
||||
int nkeys, ScanKey key);
|
||||
extern HeapTuple systable_getnext_ordered(SysScanDesc sysscan,
|
||||
ScanDirection direction);
|
||||
ScanDirection direction);
|
||||
extern void systable_endscan_ordered(SysScanDesc sysscan);
|
||||
|
||||
#endif /* GENAM_H */
|
||||
|
@@ -32,7 +32,7 @@ typedef struct GenericXLogState GenericXLogState;
|
||||
/* API for construction of generic xlog records */
|
||||
extern GenericXLogState *GenericXLogStart(Relation relation);
|
||||
extern Page GenericXLogRegisterBuffer(GenericXLogState *state, Buffer buffer,
|
||||
int flags);
|
||||
int flags);
|
||||
extern XLogRecPtr GenericXLogFinish(GenericXLogState *state);
|
||||
extern void GenericXLogAbort(GenericXLogState *state);
|
||||
|
||||
|
@@ -72,6 +72,6 @@ extern int gin_pending_list_limit;
|
||||
/* ginutil.c */
|
||||
extern void ginGetStats(Relation index, GinStatsData *stats);
|
||||
extern void ginUpdateStats(Relation index, const GinStatsData *stats,
|
||||
bool is_build);
|
||||
bool is_build);
|
||||
|
||||
#endif /* GIN_H */
|
||||
|
@@ -90,32 +90,32 @@ extern Buffer GinNewBuffer(Relation index);
|
||||
extern void GinInitBuffer(Buffer b, uint32 f);
|
||||
extern void GinInitPage(Page page, uint32 f, Size pageSize);
|
||||
extern void GinInitMetabuffer(Buffer b);
|
||||
extern int ginCompareEntries(GinState *ginstate, OffsetNumber attnum,
|
||||
Datum a, GinNullCategory categorya,
|
||||
Datum b, GinNullCategory categoryb);
|
||||
extern int ginCompareAttEntries(GinState *ginstate,
|
||||
OffsetNumber attnuma, Datum a, GinNullCategory categorya,
|
||||
OffsetNumber attnumb, Datum b, GinNullCategory categoryb);
|
||||
extern int ginCompareEntries(GinState *ginstate, OffsetNumber attnum,
|
||||
Datum a, GinNullCategory categorya,
|
||||
Datum b, GinNullCategory categoryb);
|
||||
extern int ginCompareAttEntries(GinState *ginstate,
|
||||
OffsetNumber attnuma, Datum a, GinNullCategory categorya,
|
||||
OffsetNumber attnumb, Datum b, GinNullCategory categoryb);
|
||||
extern Datum *ginExtractEntries(GinState *ginstate, OffsetNumber attnum,
|
||||
Datum value, bool isNull,
|
||||
int32 *nentries, GinNullCategory **categories);
|
||||
Datum value, bool isNull,
|
||||
int32 *nentries, GinNullCategory **categories);
|
||||
|
||||
extern OffsetNumber gintuple_get_attrnum(GinState *ginstate, IndexTuple tuple);
|
||||
extern Datum gintuple_get_key(GinState *ginstate, IndexTuple tuple,
|
||||
GinNullCategory *category);
|
||||
GinNullCategory *category);
|
||||
|
||||
/* gininsert.c */
|
||||
extern IndexBuildResult *ginbuild(Relation heap, Relation index,
|
||||
struct IndexInfo *indexInfo);
|
||||
struct IndexInfo *indexInfo);
|
||||
extern void ginbuildempty(Relation index);
|
||||
extern bool gininsert(Relation index, Datum *values, bool *isnull,
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
extern void ginEntryInsert(GinState *ginstate,
|
||||
OffsetNumber attnum, Datum key, GinNullCategory category,
|
||||
ItemPointerData *items, uint32 nitem,
|
||||
GinStatsData *buildStats);
|
||||
OffsetNumber attnum, Datum key, GinNullCategory category,
|
||||
ItemPointerData *items, uint32 nitem,
|
||||
GinStatsData *buildStats);
|
||||
|
||||
/* ginbtree.c */
|
||||
|
||||
@@ -196,34 +196,34 @@ typedef struct
|
||||
*/
|
||||
|
||||
extern GinBtreeStack *ginFindLeafPage(GinBtree btree, bool searchMode,
|
||||
bool rootConflictCheck, Snapshot snapshot);
|
||||
bool rootConflictCheck, Snapshot snapshot);
|
||||
extern Buffer ginStepRight(Buffer buffer, Relation index, int lockmode);
|
||||
extern void freeGinBtreeStack(GinBtreeStack *stack);
|
||||
extern void ginInsertValue(GinBtree btree, GinBtreeStack *stack,
|
||||
void *insertdata, GinStatsData *buildStats);
|
||||
void *insertdata, GinStatsData *buildStats);
|
||||
|
||||
/* ginentrypage.c */
|
||||
extern IndexTuple GinFormTuple(GinState *ginstate,
|
||||
OffsetNumber attnum, Datum key, GinNullCategory category,
|
||||
Pointer data, Size dataSize, int nipd, bool errorTooBig);
|
||||
OffsetNumber attnum, Datum key, GinNullCategory category,
|
||||
Pointer data, Size dataSize, int nipd, bool errorTooBig);
|
||||
extern void ginPrepareEntryScan(GinBtree btree, OffsetNumber attnum,
|
||||
Datum key, GinNullCategory category,
|
||||
GinState *ginstate);
|
||||
Datum key, GinNullCategory category,
|
||||
GinState *ginstate);
|
||||
extern void ginEntryFillRoot(GinBtree btree, Page root, BlockNumber lblkno, Page lpage, BlockNumber rblkno, Page rpage);
|
||||
extern ItemPointer ginReadTuple(GinState *ginstate, OffsetNumber attnum,
|
||||
IndexTuple itup, int *nitems);
|
||||
IndexTuple itup, int *nitems);
|
||||
|
||||
/* gindatapage.c */
|
||||
extern ItemPointer GinDataLeafPageGetItems(Page page, int *nitems, ItemPointerData advancePast);
|
||||
extern int GinDataLeafPageGetItemsToTbm(Page page, TIDBitmap *tbm);
|
||||
extern BlockNumber createPostingTree(Relation index,
|
||||
ItemPointerData *items, uint32 nitems,
|
||||
GinStatsData *buildStats, Buffer entrybuffer);
|
||||
ItemPointerData *items, uint32 nitems,
|
||||
GinStatsData *buildStats, Buffer entrybuffer);
|
||||
extern void GinDataPageAddPostingItem(Page page, PostingItem *data, OffsetNumber offset);
|
||||
extern void GinPageDeletePostingItem(Page page, OffsetNumber offset);
|
||||
extern void ginInsertItemPointers(Relation index, BlockNumber rootBlkno,
|
||||
ItemPointerData *items, uint32 nitem,
|
||||
GinStatsData *buildStats);
|
||||
ItemPointerData *items, uint32 nitem,
|
||||
GinStatsData *buildStats);
|
||||
extern GinBtreeStack *ginScanBeginPostingTree(GinBtree btree, Relation index, BlockNumber rootBlkno, Snapshot snapshot);
|
||||
extern void ginDataFillRoot(GinBtree btree, Page root, BlockNumber lblkno, Page lpage, BlockNumber rblkno, Page rpage);
|
||||
|
||||
@@ -366,7 +366,7 @@ typedef GinScanOpaqueData *GinScanOpaque;
|
||||
extern IndexScanDesc ginbeginscan(Relation rel, int nkeys, int norderbys);
|
||||
extern void ginendscan(IndexScanDesc scan);
|
||||
extern void ginrescan(IndexScanDesc scan, ScanKey key, int nscankeys,
|
||||
ScanKey orderbys, int norderbys);
|
||||
ScanKey orderbys, int norderbys);
|
||||
extern void ginNewScanKey(IndexScanDesc scan);
|
||||
extern void ginFreeScanKeys(GinScanOpaque so);
|
||||
|
||||
@@ -378,13 +378,13 @@ extern void ginInitConsistentFunction(GinState *ginstate, GinScanKey key);
|
||||
|
||||
/* ginvacuum.c */
|
||||
extern IndexBulkDeleteResult *ginbulkdelete(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
extern IndexBulkDeleteResult *ginvacuumcleanup(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats);
|
||||
IndexBulkDeleteResult *stats);
|
||||
extern ItemPointer ginVacuumItemPointers(GinVacuumState *gvs,
|
||||
ItemPointerData *items, int nitem, int *nremaining);
|
||||
ItemPointerData *items, int nitem, int *nremaining);
|
||||
|
||||
/* ginvalidate.c */
|
||||
extern bool ginvalidate(Oid opclassoid);
|
||||
@@ -414,13 +414,13 @@ typedef struct
|
||||
|
||||
extern void ginInitBA(BuildAccumulator *accum);
|
||||
extern void ginInsertBAEntries(BuildAccumulator *accum,
|
||||
ItemPointer heapptr, OffsetNumber attnum,
|
||||
Datum *entries, GinNullCategory *categories,
|
||||
int32 nentries);
|
||||
ItemPointer heapptr, OffsetNumber attnum,
|
||||
Datum *entries, GinNullCategory *categories,
|
||||
int32 nentries);
|
||||
extern void ginBeginBAScan(BuildAccumulator *accum);
|
||||
extern ItemPointerData *ginGetBAEntry(BuildAccumulator *accum,
|
||||
OffsetNumber *attnum, Datum *key, GinNullCategory *category,
|
||||
uint32 *n);
|
||||
OffsetNumber *attnum, Datum *key, GinNullCategory *category,
|
||||
uint32 *n);
|
||||
|
||||
/* ginfast.c */
|
||||
|
||||
@@ -433,25 +433,25 @@ typedef struct GinTupleCollector
|
||||
} GinTupleCollector;
|
||||
|
||||
extern void ginHeapTupleFastInsert(GinState *ginstate,
|
||||
GinTupleCollector *collector);
|
||||
GinTupleCollector *collector);
|
||||
extern void ginHeapTupleFastCollect(GinState *ginstate,
|
||||
GinTupleCollector *collector,
|
||||
OffsetNumber attnum, Datum value, bool isNull,
|
||||
ItemPointer ht_ctid);
|
||||
GinTupleCollector *collector,
|
||||
OffsetNumber attnum, Datum value, bool isNull,
|
||||
ItemPointer ht_ctid);
|
||||
extern void ginInsertCleanup(GinState *ginstate, bool full_clean,
|
||||
bool fill_fsm, bool forceCleanup, IndexBulkDeleteResult *stats);
|
||||
bool fill_fsm, bool forceCleanup, IndexBulkDeleteResult *stats);
|
||||
|
||||
/* ginpostinglist.c */
|
||||
|
||||
extern GinPostingList *ginCompressPostingList(const ItemPointer ptrs, int nptrs,
|
||||
int maxsize, int *nwritten);
|
||||
int maxsize, int *nwritten);
|
||||
extern int ginPostingListDecodeAllSegmentsToTbm(GinPostingList *ptr, int totalsize, TIDBitmap *tbm);
|
||||
|
||||
extern ItemPointer ginPostingListDecodeAllSegments(GinPostingList *ptr, int len, int *ndecoded);
|
||||
extern ItemPointer ginPostingListDecode(GinPostingList *ptr, int *ndecoded);
|
||||
extern ItemPointer ginMergeItemPointers(ItemPointerData *a, uint32 na,
|
||||
ItemPointerData *b, uint32 nb,
|
||||
int *nmerged);
|
||||
ItemPointerData *b, uint32 nb,
|
||||
int *nmerged);
|
||||
|
||||
/*
|
||||
* Merging the results of several gin scans compares item pointers a lot,
|
||||
|
@@ -391,18 +391,18 @@ typedef struct GiSTOptions
|
||||
/* gist.c */
|
||||
extern void gistbuildempty(Relation index);
|
||||
extern bool gistinsert(Relation r, Datum *values, bool *isnull,
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
extern MemoryContext createTempGistContext(void);
|
||||
extern GISTSTATE *initGISTstate(Relation index);
|
||||
extern void freeGISTstate(GISTSTATE *giststate);
|
||||
extern void gistdoinsert(Relation r,
|
||||
IndexTuple itup,
|
||||
Size freespace,
|
||||
GISTSTATE *GISTstate,
|
||||
Relation heapRel,
|
||||
bool is_build);
|
||||
IndexTuple itup,
|
||||
Size freespace,
|
||||
GISTSTATE *GISTstate,
|
||||
Relation heapRel,
|
||||
bool is_build);
|
||||
|
||||
/* A List of these is returned from gistplacetopage() in *splitinfo */
|
||||
typedef struct
|
||||
@@ -412,38 +412,38 @@ typedef struct
|
||||
} GISTPageSplitInfo;
|
||||
|
||||
extern bool gistplacetopage(Relation rel, Size freespace, GISTSTATE *giststate,
|
||||
Buffer buffer,
|
||||
IndexTuple *itup, int ntup,
|
||||
OffsetNumber oldoffnum, BlockNumber *newblkno,
|
||||
Buffer leftchildbuf,
|
||||
List **splitinfo,
|
||||
bool markleftchild,
|
||||
Relation heapRel,
|
||||
bool is_build);
|
||||
Buffer buffer,
|
||||
IndexTuple *itup, int ntup,
|
||||
OffsetNumber oldoffnum, BlockNumber *newblkno,
|
||||
Buffer leftchildbuf,
|
||||
List **splitinfo,
|
||||
bool markleftchild,
|
||||
Relation heapRel,
|
||||
bool is_build);
|
||||
|
||||
extern SplitedPageLayout *gistSplit(Relation r, Page page, IndexTuple *itup,
|
||||
int len, GISTSTATE *giststate);
|
||||
int len, GISTSTATE *giststate);
|
||||
|
||||
/* gistxlog.c */
|
||||
extern XLogRecPtr gistXLogPageDelete(Buffer buffer,
|
||||
TransactionId xid, Buffer parentBuffer,
|
||||
OffsetNumber downlinkOffset);
|
||||
TransactionId xid, Buffer parentBuffer,
|
||||
OffsetNumber downlinkOffset);
|
||||
|
||||
extern void gistXLogPageReuse(Relation rel, BlockNumber blkno,
|
||||
TransactionId latestRemovedXid);
|
||||
TransactionId latestRemovedXid);
|
||||
|
||||
extern XLogRecPtr gistXLogUpdate(Buffer buffer,
|
||||
OffsetNumber *todelete, int ntodelete,
|
||||
IndexTuple *itup, int ntup,
|
||||
Buffer leftchild);
|
||||
OffsetNumber *todelete, int ntodelete,
|
||||
IndexTuple *itup, int ntup,
|
||||
Buffer leftchild);
|
||||
|
||||
extern XLogRecPtr gistXLogDelete(Buffer buffer, OffsetNumber *todelete,
|
||||
int ntodelete, TransactionId latestRemovedXid);
|
||||
int ntodelete, TransactionId latestRemovedXid);
|
||||
|
||||
extern XLogRecPtr gistXLogSplit(bool page_is_leaf,
|
||||
SplitedPageLayout *dist,
|
||||
BlockNumber origrlink, GistNSN oldnsn,
|
||||
Buffer leftchild, bool markfollowright);
|
||||
SplitedPageLayout *dist,
|
||||
BlockNumber origrlink, GistNSN oldnsn,
|
||||
Buffer leftchild, bool markfollowright);
|
||||
|
||||
/* gistget.c */
|
||||
extern bool gistgettuple(IndexScanDesc scan, ScanDirection dir);
|
||||
@@ -463,90 +463,90 @@ extern bool gistvalidate(Oid opclassoid);
|
||||
|
||||
extern bytea *gistoptions(Datum reloptions, bool validate);
|
||||
extern bool gistproperty(Oid index_oid, int attno,
|
||||
IndexAMProperty prop, const char *propname,
|
||||
bool *res, bool *isnull);
|
||||
IndexAMProperty prop, const char *propname,
|
||||
bool *res, bool *isnull);
|
||||
extern bool gistfitpage(IndexTuple *itvec, int len);
|
||||
extern bool gistnospace(Page page, IndexTuple *itvec, int len, OffsetNumber todelete, Size freespace);
|
||||
extern void gistcheckpage(Relation rel, Buffer buf);
|
||||
extern Buffer gistNewBuffer(Relation r);
|
||||
extern bool gistPageRecyclable(Page page);
|
||||
extern void gistfillbuffer(Page page, IndexTuple *itup, int len,
|
||||
OffsetNumber off);
|
||||
OffsetNumber off);
|
||||
extern IndexTuple *gistextractpage(Page page, int *len /* out */ );
|
||||
extern IndexTuple *gistjoinvector(
|
||||
IndexTuple *itvec, int *len,
|
||||
IndexTuple *additvec, int addlen);
|
||||
IndexTuple *itvec, int *len,
|
||||
IndexTuple *additvec, int addlen);
|
||||
extern IndexTupleData *gistfillitupvec(IndexTuple *vec, int veclen, int *memlen);
|
||||
|
||||
extern IndexTuple gistunion(Relation r, IndexTuple *itvec,
|
||||
int len, GISTSTATE *giststate);
|
||||
int len, GISTSTATE *giststate);
|
||||
extern IndexTuple gistgetadjusted(Relation r,
|
||||
IndexTuple oldtup,
|
||||
IndexTuple addtup,
|
||||
GISTSTATE *giststate);
|
||||
IndexTuple oldtup,
|
||||
IndexTuple addtup,
|
||||
GISTSTATE *giststate);
|
||||
extern IndexTuple gistFormTuple(GISTSTATE *giststate,
|
||||
Relation r, Datum *attdata, bool *isnull, bool isleaf);
|
||||
Relation r, Datum *attdata, bool *isnull, bool isleaf);
|
||||
|
||||
extern OffsetNumber gistchoose(Relation r, Page p,
|
||||
IndexTuple it,
|
||||
GISTSTATE *giststate);
|
||||
IndexTuple it,
|
||||
GISTSTATE *giststate);
|
||||
|
||||
extern void GISTInitBuffer(Buffer b, uint32 f);
|
||||
extern void gistdentryinit(GISTSTATE *giststate, int nkey, GISTENTRY *e,
|
||||
Datum k, Relation r, Page pg, OffsetNumber o,
|
||||
bool l, bool isNull);
|
||||
Datum k, Relation r, Page pg, OffsetNumber o,
|
||||
bool l, bool isNull);
|
||||
|
||||
extern float gistpenalty(GISTSTATE *giststate, int attno,
|
||||
GISTENTRY *key1, bool isNull1,
|
||||
GISTENTRY *key2, bool isNull2);
|
||||
GISTENTRY *key1, bool isNull1,
|
||||
GISTENTRY *key2, bool isNull2);
|
||||
extern void gistMakeUnionItVec(GISTSTATE *giststate, IndexTuple *itvec, int len,
|
||||
Datum *attr, bool *isnull);
|
||||
Datum *attr, bool *isnull);
|
||||
extern bool gistKeyIsEQ(GISTSTATE *giststate, int attno, Datum a, Datum b);
|
||||
extern void gistDeCompressAtt(GISTSTATE *giststate, Relation r, IndexTuple tuple, Page p,
|
||||
OffsetNumber o, GISTENTRY *attdata, bool *isnull);
|
||||
OffsetNumber o, GISTENTRY *attdata, bool *isnull);
|
||||
extern HeapTuple gistFetchTuple(GISTSTATE *giststate, Relation r,
|
||||
IndexTuple tuple);
|
||||
IndexTuple tuple);
|
||||
extern void gistMakeUnionKey(GISTSTATE *giststate, int attno,
|
||||
GISTENTRY *entry1, bool isnull1,
|
||||
GISTENTRY *entry2, bool isnull2,
|
||||
Datum *dst, bool *dstisnull);
|
||||
GISTENTRY *entry1, bool isnull1,
|
||||
GISTENTRY *entry2, bool isnull2,
|
||||
Datum *dst, bool *dstisnull);
|
||||
|
||||
extern XLogRecPtr gistGetFakeLSN(Relation rel);
|
||||
|
||||
/* gistvacuum.c */
|
||||
extern IndexBulkDeleteResult *gistbulkdelete(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
extern IndexBulkDeleteResult *gistvacuumcleanup(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats);
|
||||
IndexBulkDeleteResult *stats);
|
||||
|
||||
/* gistsplit.c */
|
||||
extern void gistSplitByKey(Relation r, Page page, IndexTuple *itup,
|
||||
int len, GISTSTATE *giststate,
|
||||
GistSplitVector *v,
|
||||
int attno);
|
||||
int len, GISTSTATE *giststate,
|
||||
GistSplitVector *v,
|
||||
int attno);
|
||||
|
||||
/* gistbuild.c */
|
||||
extern IndexBuildResult *gistbuild(Relation heap, Relation index,
|
||||
struct IndexInfo *indexInfo);
|
||||
struct IndexInfo *indexInfo);
|
||||
extern void gistValidateBufferingOption(const char *value);
|
||||
|
||||
/* gistbuildbuffers.c */
|
||||
extern GISTBuildBuffers *gistInitBuildBuffers(int pagesPerBuffer, int levelStep,
|
||||
int maxLevel);
|
||||
int maxLevel);
|
||||
extern GISTNodeBuffer *gistGetNodeBuffer(GISTBuildBuffers *gfbb,
|
||||
GISTSTATE *giststate,
|
||||
BlockNumber blkno, int level);
|
||||
GISTSTATE *giststate,
|
||||
BlockNumber blkno, int level);
|
||||
extern void gistPushItupToNodeBuffer(GISTBuildBuffers *gfbb,
|
||||
GISTNodeBuffer *nodeBuffer, IndexTuple item);
|
||||
GISTNodeBuffer *nodeBuffer, IndexTuple item);
|
||||
extern bool gistPopItupFromNodeBuffer(GISTBuildBuffers *gfbb,
|
||||
GISTNodeBuffer *nodeBuffer, IndexTuple *item);
|
||||
GISTNodeBuffer *nodeBuffer, IndexTuple *item);
|
||||
extern void gistFreeBuildBuffers(GISTBuildBuffers *gfbb);
|
||||
extern void gistRelocateBuildBuffersOnSplit(GISTBuildBuffers *gfbb,
|
||||
GISTSTATE *giststate, Relation r,
|
||||
int level, Buffer buffer,
|
||||
List *splitinfo);
|
||||
GISTSTATE *giststate, Relation r,
|
||||
int level, Buffer buffer,
|
||||
List *splitinfo);
|
||||
extern void gistUnloadNodeBuffers(GISTBuildBuffers *gfbb);
|
||||
|
||||
#endif /* GIST_PRIVATE_H */
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
extern IndexScanDesc gistbeginscan(Relation r, int nkeys, int norderbys);
|
||||
extern void gistrescan(IndexScanDesc scan, ScanKey key, int nkeys,
|
||||
ScanKey orderbys, int norderbys);
|
||||
ScanKey orderbys, int norderbys);
|
||||
extern void gistendscan(IndexScanDesc scan);
|
||||
|
||||
#endif /* GISTSCAN_H */
|
||||
|
@@ -343,24 +343,24 @@ typedef HashMetaPageData *HashMetaPage;
|
||||
/* public routines */
|
||||
|
||||
extern IndexBuildResult *hashbuild(Relation heap, Relation index,
|
||||
struct IndexInfo *indexInfo);
|
||||
struct IndexInfo *indexInfo);
|
||||
extern void hashbuildempty(Relation index);
|
||||
extern bool hashinsert(Relation rel, Datum *values, bool *isnull,
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
extern bool hashgettuple(IndexScanDesc scan, ScanDirection dir);
|
||||
extern int64 hashgetbitmap(IndexScanDesc scan, TIDBitmap *tbm);
|
||||
extern IndexScanDesc hashbeginscan(Relation rel, int nkeys, int norderbys);
|
||||
extern void hashrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys,
|
||||
ScanKey orderbys, int norderbys);
|
||||
ScanKey orderbys, int norderbys);
|
||||
extern void hashendscan(IndexScanDesc scan);
|
||||
extern IndexBulkDeleteResult *hashbulkdelete(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
extern IndexBulkDeleteResult *hashvacuumcleanup(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats);
|
||||
IndexBulkDeleteResult *stats);
|
||||
extern bytea *hashoptions(Datum reloptions, bool validate);
|
||||
extern bool hashvalidate(Oid opclassoid);
|
||||
|
||||
@@ -369,52 +369,52 @@ extern bool hashvalidate(Oid opclassoid);
|
||||
/* hashinsert.c */
|
||||
extern void _hash_doinsert(Relation rel, IndexTuple itup, Relation heapRel);
|
||||
extern OffsetNumber _hash_pgaddtup(Relation rel, Buffer buf,
|
||||
Size itemsize, IndexTuple itup);
|
||||
Size itemsize, IndexTuple itup);
|
||||
extern void _hash_pgaddmultitup(Relation rel, Buffer buf, IndexTuple *itups,
|
||||
OffsetNumber *itup_offsets, uint16 nitups);
|
||||
OffsetNumber *itup_offsets, uint16 nitups);
|
||||
|
||||
/* hashovfl.c */
|
||||
extern Buffer _hash_addovflpage(Relation rel, Buffer metabuf, Buffer buf, bool retain_pin);
|
||||
extern BlockNumber _hash_freeovflpage(Relation rel, Buffer bucketbuf, Buffer ovflbuf,
|
||||
Buffer wbuf, IndexTuple *itups, OffsetNumber *itup_offsets,
|
||||
Size *tups_size, uint16 nitups, BufferAccessStrategy bstrategy);
|
||||
Buffer wbuf, IndexTuple *itups, OffsetNumber *itup_offsets,
|
||||
Size *tups_size, uint16 nitups, BufferAccessStrategy bstrategy);
|
||||
extern void _hash_initbitmapbuffer(Buffer buf, uint16 bmsize, bool initpage);
|
||||
extern void _hash_squeezebucket(Relation rel,
|
||||
Bucket bucket, BlockNumber bucket_blkno,
|
||||
Buffer bucket_buf,
|
||||
BufferAccessStrategy bstrategy);
|
||||
Bucket bucket, BlockNumber bucket_blkno,
|
||||
Buffer bucket_buf,
|
||||
BufferAccessStrategy bstrategy);
|
||||
extern uint32 _hash_ovflblkno_to_bitno(HashMetaPage metap, BlockNumber ovflblkno);
|
||||
|
||||
/* hashpage.c */
|
||||
extern Buffer _hash_getbuf(Relation rel, BlockNumber blkno,
|
||||
int access, int flags);
|
||||
int access, int flags);
|
||||
extern Buffer _hash_getbuf_with_condlock_cleanup(Relation rel,
|
||||
BlockNumber blkno, int flags);
|
||||
BlockNumber blkno, int flags);
|
||||
extern HashMetaPage _hash_getcachedmetap(Relation rel, Buffer *metabuf,
|
||||
bool force_refresh);
|
||||
bool force_refresh);
|
||||
extern Buffer _hash_getbucketbuf_from_hashkey(Relation rel, uint32 hashkey,
|
||||
int access,
|
||||
HashMetaPage *cachedmetap);
|
||||
int access,
|
||||
HashMetaPage *cachedmetap);
|
||||
extern Buffer _hash_getinitbuf(Relation rel, BlockNumber blkno);
|
||||
extern void _hash_initbuf(Buffer buf, uint32 max_bucket, uint32 num_bucket,
|
||||
uint32 flag, bool initpage);
|
||||
uint32 flag, bool initpage);
|
||||
extern Buffer _hash_getnewbuf(Relation rel, BlockNumber blkno,
|
||||
ForkNumber forkNum);
|
||||
ForkNumber forkNum);
|
||||
extern Buffer _hash_getbuf_with_strategy(Relation rel, BlockNumber blkno,
|
||||
int access, int flags,
|
||||
BufferAccessStrategy bstrategy);
|
||||
int access, int flags,
|
||||
BufferAccessStrategy bstrategy);
|
||||
extern void _hash_relbuf(Relation rel, Buffer buf);
|
||||
extern void _hash_dropbuf(Relation rel, Buffer buf);
|
||||
extern void _hash_dropscanbuf(Relation rel, HashScanOpaque so);
|
||||
extern uint32 _hash_init(Relation rel, double num_tuples,
|
||||
ForkNumber forkNum);
|
||||
ForkNumber forkNum);
|
||||
extern void _hash_init_metabuffer(Buffer buf, double num_tuples,
|
||||
RegProcedure procid, uint16 ffactor, bool initpage);
|
||||
RegProcedure procid, uint16 ffactor, bool initpage);
|
||||
extern void _hash_pageinit(Page page, Size size);
|
||||
extern void _hash_expandtable(Relation rel, Buffer metabuf);
|
||||
extern void _hash_finish_split(Relation rel, Buffer metabuf, Buffer obuf,
|
||||
Bucket obucket, uint32 maxbucket, uint32 highmask,
|
||||
uint32 lowmask);
|
||||
Bucket obucket, uint32 maxbucket, uint32 highmask,
|
||||
uint32 lowmask);
|
||||
|
||||
/* hashsearch.c */
|
||||
extern bool _hash_next(IndexScanDesc scan, ScanDirection dir);
|
||||
@@ -426,7 +426,7 @@ typedef struct HSpool HSpool; /* opaque struct in hashsort.c */
|
||||
extern HSpool *_h_spoolinit(Relation heap, Relation index, uint32 num_buckets);
|
||||
extern void _h_spooldestroy(HSpool *hspool);
|
||||
extern void _h_spool(HSpool *hspool, ItemPointer self,
|
||||
Datum *values, bool *isnull);
|
||||
Datum *values, bool *isnull);
|
||||
extern void _h_indexbuild(HSpool *hspool, Relation heapRel);
|
||||
|
||||
/* hashutil.c */
|
||||
@@ -434,30 +434,30 @@ extern bool _hash_checkqual(IndexScanDesc scan, IndexTuple itup);
|
||||
extern uint32 _hash_datum2hashkey(Relation rel, Datum key);
|
||||
extern uint32 _hash_datum2hashkey_type(Relation rel, Datum key, Oid keytype);
|
||||
extern Bucket _hash_hashkey2bucket(uint32 hashkey, uint32 maxbucket,
|
||||
uint32 highmask, uint32 lowmask);
|
||||
uint32 highmask, uint32 lowmask);
|
||||
extern uint32 _hash_log2(uint32 num);
|
||||
extern uint32 _hash_spareindex(uint32 num_bucket);
|
||||
extern uint32 _hash_get_totalbuckets(uint32 splitpoint_phase);
|
||||
extern void _hash_checkpage(Relation rel, Buffer buf, int flags);
|
||||
extern uint32 _hash_get_indextuple_hashkey(IndexTuple itup);
|
||||
extern bool _hash_convert_tuple(Relation index,
|
||||
Datum *user_values, bool *user_isnull,
|
||||
Datum *index_values, bool *index_isnull);
|
||||
Datum *user_values, bool *user_isnull,
|
||||
Datum *index_values, bool *index_isnull);
|
||||
extern OffsetNumber _hash_binsearch(Page page, uint32 hash_value);
|
||||
extern OffsetNumber _hash_binsearch_last(Page page, uint32 hash_value);
|
||||
extern BlockNumber _hash_get_oldblock_from_newbucket(Relation rel, Bucket new_bucket);
|
||||
extern BlockNumber _hash_get_newblock_from_oldbucket(Relation rel, Bucket old_bucket);
|
||||
extern Bucket _hash_get_newbucket_from_oldbucket(Relation rel, Bucket old_bucket,
|
||||
uint32 lowmask, uint32 maxbucket);
|
||||
uint32 lowmask, uint32 maxbucket);
|
||||
extern void _hash_kill_items(IndexScanDesc scan);
|
||||
|
||||
/* hash.c */
|
||||
extern void hashbucketcleanup(Relation rel, Bucket cur_bucket,
|
||||
Buffer bucket_buf, BlockNumber bucket_blkno,
|
||||
BufferAccessStrategy bstrategy,
|
||||
uint32 maxbucket, uint32 highmask, uint32 lowmask,
|
||||
double *tuples_removed, double *num_index_tuples,
|
||||
bool bucket_has_garbage,
|
||||
IndexBulkDeleteCallback callback, void *callback_state);
|
||||
Buffer bucket_buf, BlockNumber bucket_blkno,
|
||||
BufferAccessStrategy bstrategy,
|
||||
uint32 maxbucket, uint32 highmask, uint32 lowmask,
|
||||
double *tuples_removed, double *num_index_tuples,
|
||||
bool bucket_has_garbage,
|
||||
IndexBulkDeleteCallback callback, void *callback_state);
|
||||
|
||||
#endif /* HASH_H */
|
||||
|
@@ -108,26 +108,26 @@ typedef enum
|
||||
#define HeapScanIsValid(scan) PointerIsValid(scan)
|
||||
|
||||
extern TableScanDesc heap_beginscan(Relation relation, Snapshot snapshot,
|
||||
int nkeys, ScanKey key,
|
||||
ParallelTableScanDesc parallel_scan,
|
||||
uint32 flags);
|
||||
int nkeys, ScanKey key,
|
||||
ParallelTableScanDesc parallel_scan,
|
||||
uint32 flags);
|
||||
extern void heap_setscanlimits(TableScanDesc scan, BlockNumber startBlk,
|
||||
BlockNumber endBlk);
|
||||
BlockNumber endBlk);
|
||||
extern void heapgetpage(TableScanDesc scan, BlockNumber page);
|
||||
extern void heap_rescan(TableScanDesc scan, ScanKey key, bool set_params,
|
||||
bool allow_strat, bool allow_sync, bool allow_pagemode);
|
||||
bool allow_strat, bool allow_sync, bool allow_pagemode);
|
||||
extern void heap_rescan_set_params(TableScanDesc scan, ScanKey key,
|
||||
bool allow_strat, bool allow_sync, bool allow_pagemode);
|
||||
bool allow_strat, bool allow_sync, bool allow_pagemode);
|
||||
extern void heap_endscan(TableScanDesc scan);
|
||||
extern HeapTuple heap_getnext(TableScanDesc scan, ScanDirection direction);
|
||||
extern bool heap_getnextslot(TableScanDesc sscan,
|
||||
ScanDirection direction, struct TupleTableSlot *slot);
|
||||
ScanDirection direction, struct TupleTableSlot *slot);
|
||||
|
||||
extern bool heap_fetch(Relation relation, Snapshot snapshot,
|
||||
HeapTuple tuple, Buffer *userbuf);
|
||||
HeapTuple tuple, Buffer *userbuf);
|
||||
extern bool heap_hot_search_buffer(ItemPointer tid, Relation relation,
|
||||
Buffer buffer, Snapshot snapshot, HeapTuple heapTuple,
|
||||
bool *all_dead, bool first_call);
|
||||
Buffer buffer, Snapshot snapshot, HeapTuple heapTuple,
|
||||
bool *all_dead, bool first_call);
|
||||
|
||||
extern void heap_get_latest_tid(TableScanDesc scan, ItemPointer tid);
|
||||
extern void setLastTid(const ItemPointer tid);
|
||||
@@ -137,52 +137,52 @@ extern void FreeBulkInsertState(BulkInsertState);
|
||||
extern void ReleaseBulkInsertStatePin(BulkInsertState bistate);
|
||||
|
||||
extern void heap_insert(Relation relation, HeapTuple tup, CommandId cid,
|
||||
int options, BulkInsertState bistate);
|
||||
int options, BulkInsertState bistate);
|
||||
extern void heap_multi_insert(Relation relation, struct TupleTableSlot **slots,
|
||||
int ntuples, CommandId cid, int options,
|
||||
BulkInsertState bistate);
|
||||
int ntuples, CommandId cid, int options,
|
||||
BulkInsertState bistate);
|
||||
extern TM_Result heap_delete(Relation relation, ItemPointer tid,
|
||||
CommandId cid, Snapshot crosscheck, bool wait,
|
||||
struct TM_FailureData *tmfd, bool changingPart);
|
||||
CommandId cid, Snapshot crosscheck, bool wait,
|
||||
struct TM_FailureData *tmfd, bool changingPart);
|
||||
extern void heap_finish_speculative(Relation relation, ItemPointer tid);
|
||||
extern void heap_abort_speculative(Relation relation, ItemPointer tid);
|
||||
extern TM_Result heap_update(Relation relation, ItemPointer otid,
|
||||
HeapTuple newtup,
|
||||
CommandId cid, Snapshot crosscheck, bool wait,
|
||||
struct TM_FailureData *tmfd, LockTupleMode *lockmode);
|
||||
HeapTuple newtup,
|
||||
CommandId cid, Snapshot crosscheck, bool wait,
|
||||
struct TM_FailureData *tmfd, LockTupleMode *lockmode);
|
||||
extern TM_Result heap_lock_tuple(Relation relation, HeapTuple tuple,
|
||||
CommandId cid, LockTupleMode mode, LockWaitPolicy wait_policy,
|
||||
bool follow_update,
|
||||
Buffer *buffer, struct TM_FailureData *tmfd);
|
||||
CommandId cid, LockTupleMode mode, LockWaitPolicy wait_policy,
|
||||
bool follow_update,
|
||||
Buffer *buffer, struct TM_FailureData *tmfd);
|
||||
|
||||
extern void heap_inplace_update(Relation relation, HeapTuple tuple);
|
||||
extern bool heap_freeze_tuple(HeapTupleHeader tuple,
|
||||
TransactionId relfrozenxid, TransactionId relminmxid,
|
||||
TransactionId cutoff_xid, TransactionId cutoff_multi);
|
||||
TransactionId relfrozenxid, TransactionId relminmxid,
|
||||
TransactionId cutoff_xid, TransactionId cutoff_multi);
|
||||
extern bool heap_tuple_needs_freeze(HeapTupleHeader tuple, TransactionId cutoff_xid,
|
||||
MultiXactId cutoff_multi, Buffer buf);
|
||||
MultiXactId cutoff_multi, Buffer buf);
|
||||
extern bool heap_tuple_needs_eventual_freeze(HeapTupleHeader tuple);
|
||||
|
||||
extern void simple_heap_insert(Relation relation, HeapTuple tup);
|
||||
extern void simple_heap_delete(Relation relation, ItemPointer tid);
|
||||
extern void simple_heap_update(Relation relation, ItemPointer otid,
|
||||
HeapTuple tup);
|
||||
HeapTuple tup);
|
||||
|
||||
extern void heap_sync(Relation relation);
|
||||
|
||||
extern TransactionId heap_compute_xid_horizon_for_tuples(Relation rel,
|
||||
ItemPointerData *items,
|
||||
int nitems);
|
||||
ItemPointerData *items,
|
||||
int nitems);
|
||||
|
||||
/* in heap/pruneheap.c */
|
||||
extern void heap_page_prune_opt(Relation relation, Buffer buffer);
|
||||
extern int heap_page_prune(Relation relation, Buffer buffer,
|
||||
TransactionId OldestXmin,
|
||||
bool report_stats, TransactionId *latestRemovedXid);
|
||||
extern int heap_page_prune(Relation relation, Buffer buffer,
|
||||
TransactionId OldestXmin,
|
||||
bool report_stats, TransactionId *latestRemovedXid);
|
||||
extern void heap_page_prune_execute(Buffer buffer,
|
||||
OffsetNumber *redirected, int nredirected,
|
||||
OffsetNumber *nowdead, int ndead,
|
||||
OffsetNumber *nowunused, int nunused);
|
||||
OffsetNumber *redirected, int nredirected,
|
||||
OffsetNumber *nowdead, int ndead,
|
||||
OffsetNumber *nowunused, int nunused);
|
||||
extern void heap_get_root_tuples(Page page, OffsetNumber *root_offsets);
|
||||
|
||||
/* in heap/syncscan.c */
|
||||
@@ -194,17 +194,17 @@ extern Size SyncScanShmemSize(void);
|
||||
/* in heap/vacuumlazy.c */
|
||||
struct VacuumParams;
|
||||
extern void heap_vacuum_rel(Relation onerel,
|
||||
struct VacuumParams *params, BufferAccessStrategy bstrategy);
|
||||
struct VacuumParams *params, BufferAccessStrategy bstrategy);
|
||||
|
||||
/* in heap/heapam_visibility.c */
|
||||
extern bool HeapTupleSatisfiesVisibility(HeapTuple stup, Snapshot snapshot,
|
||||
Buffer buffer);
|
||||
Buffer buffer);
|
||||
extern TM_Result HeapTupleSatisfiesUpdate(HeapTuple stup, CommandId curcid,
|
||||
Buffer buffer);
|
||||
Buffer buffer);
|
||||
extern HTSV_Result HeapTupleSatisfiesVacuum(HeapTuple stup, TransactionId OldestXmin,
|
||||
Buffer buffer);
|
||||
Buffer buffer);
|
||||
extern void HeapTupleSetHintBits(HeapTupleHeader tuple, Buffer buffer,
|
||||
uint16 infomask, TransactionId xid);
|
||||
uint16 infomask, TransactionId xid);
|
||||
extern bool HeapTupleHeaderIsOnlyLocked(HeapTupleHeader tuple);
|
||||
extern bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot);
|
||||
extern bool HeapTupleIsSurelyDead(HeapTuple htup, TransactionId OldestXmin);
|
||||
@@ -215,9 +215,9 @@ extern bool HeapTupleIsSurelyDead(HeapTuple htup, TransactionId OldestXmin);
|
||||
*/
|
||||
struct HTAB;
|
||||
extern bool ResolveCminCmaxDuringDecoding(struct HTAB *tuplecid_data,
|
||||
Snapshot snapshot,
|
||||
HeapTuple htup,
|
||||
Buffer buffer,
|
||||
CommandId *cmin, CommandId *cmax);
|
||||
Snapshot snapshot,
|
||||
HeapTuple htup,
|
||||
Buffer buffer,
|
||||
CommandId *cmin, CommandId *cmax);
|
||||
|
||||
#endif /* HEAPAM_H */
|
||||
|
@@ -384,7 +384,7 @@ typedef struct xl_heap_rewrite_mapping
|
||||
} xl_heap_rewrite_mapping;
|
||||
|
||||
extern void HeapTupleHeaderAdvanceLatestRemovedXid(HeapTupleHeader tuple,
|
||||
TransactionId *latestRemovedXid);
|
||||
TransactionId *latestRemovedXid);
|
||||
|
||||
extern void heap_redo(XLogReaderState *record);
|
||||
extern void heap_desc(StringInfo buf, XLogReaderState *record);
|
||||
@@ -396,25 +396,25 @@ extern const char *heap2_identify(uint8 info);
|
||||
extern void heap_xlog_logical_rewrite(XLogReaderState *r);
|
||||
|
||||
extern XLogRecPtr log_heap_cleanup_info(RelFileNode rnode,
|
||||
TransactionId latestRemovedXid);
|
||||
TransactionId latestRemovedXid);
|
||||
extern XLogRecPtr log_heap_clean(Relation reln, Buffer buffer,
|
||||
OffsetNumber *redirected, int nredirected,
|
||||
OffsetNumber *nowdead, int ndead,
|
||||
OffsetNumber *nowunused, int nunused,
|
||||
TransactionId latestRemovedXid);
|
||||
OffsetNumber *redirected, int nredirected,
|
||||
OffsetNumber *nowdead, int ndead,
|
||||
OffsetNumber *nowunused, int nunused,
|
||||
TransactionId latestRemovedXid);
|
||||
extern XLogRecPtr log_heap_freeze(Relation reln, Buffer buffer,
|
||||
TransactionId cutoff_xid, xl_heap_freeze_tuple *tuples,
|
||||
int ntuples);
|
||||
TransactionId cutoff_xid, xl_heap_freeze_tuple *tuples,
|
||||
int ntuples);
|
||||
extern bool heap_prepare_freeze_tuple(HeapTupleHeader tuple,
|
||||
TransactionId relfrozenxid,
|
||||
TransactionId relminmxid,
|
||||
TransactionId cutoff_xid,
|
||||
TransactionId cutoff_multi,
|
||||
xl_heap_freeze_tuple *frz,
|
||||
bool *totally_frozen);
|
||||
TransactionId relfrozenxid,
|
||||
TransactionId relminmxid,
|
||||
TransactionId cutoff_xid,
|
||||
TransactionId cutoff_multi,
|
||||
xl_heap_freeze_tuple *frz,
|
||||
bool *totally_frozen);
|
||||
extern void heap_execute_freeze_tuple(HeapTupleHeader tuple,
|
||||
xl_heap_freeze_tuple *xlrec_tp);
|
||||
xl_heap_freeze_tuple *xlrec_tp);
|
||||
extern XLogRecPtr log_heap_visible(RelFileNode rnode, Buffer heap_buffer,
|
||||
Buffer vm_buffer, TransactionId cutoff_xid, uint8 flags);
|
||||
Buffer vm_buffer, TransactionId cutoff_xid, uint8 flags);
|
||||
|
||||
#endif /* HEAPAM_XLOG_H */
|
||||
|
@@ -35,10 +35,10 @@ typedef struct BulkInsertStateData
|
||||
|
||||
|
||||
extern void RelationPutHeapTuple(Relation relation, Buffer buffer,
|
||||
HeapTuple tuple, bool token);
|
||||
HeapTuple tuple, bool token);
|
||||
extern Buffer RelationGetBufferForTuple(Relation relation, Size len,
|
||||
Buffer otherBuffer, int options,
|
||||
BulkInsertStateData *bistate,
|
||||
Buffer *vmbuffer, Buffer *vmbuffer_other);
|
||||
Buffer otherBuffer, int options,
|
||||
BulkInsertStateData *bistate,
|
||||
Buffer *vmbuffer, Buffer *vmbuffer_other);
|
||||
|
||||
#endif /* HIO_H */
|
||||
|
@@ -81,7 +81,7 @@ typedef HeapTupleData *HeapTuple;
|
||||
extern CommandId HeapTupleHeaderGetCmin(HeapTupleHeader tup);
|
||||
extern CommandId HeapTupleHeaderGetCmax(HeapTupleHeader tup);
|
||||
extern void HeapTupleHeaderAdjustCmax(HeapTupleHeader tup,
|
||||
CommandId *cmax, bool *iscombo);
|
||||
CommandId *cmax, bool *iscombo);
|
||||
|
||||
/* Prototype for HeapTupleHeader accessors in heapam.c */
|
||||
extern TransactionId HeapTupleGetUpdateXid(HeapTupleHeader tuple);
|
||||
|
@@ -740,7 +740,7 @@ struct MinimalTupleData
|
||||
#else /* defined(DISABLE_COMPLEX_MACRO) */
|
||||
|
||||
extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
|
||||
bool *isnull);
|
||||
bool *isnull);
|
||||
#endif /* defined(DISABLE_COMPLEX_MACRO) */
|
||||
|
||||
|
||||
@@ -775,39 +775,39 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
|
||||
|
||||
/* prototypes for functions in common/heaptuple.c */
|
||||
extern Size heap_compute_data_size(TupleDesc tupleDesc,
|
||||
Datum *values, bool *isnull);
|
||||
Datum *values, bool *isnull);
|
||||
extern void heap_fill_tuple(TupleDesc tupleDesc,
|
||||
Datum *values, bool *isnull,
|
||||
char *data, Size data_size,
|
||||
uint16 *infomask, bits8 *bit);
|
||||
Datum *values, bool *isnull,
|
||||
char *data, Size data_size,
|
||||
uint16 *infomask, bits8 *bit);
|
||||
extern bool heap_attisnull(HeapTuple tup, int attnum, TupleDesc tupleDesc);
|
||||
extern Datum nocachegetattr(HeapTuple tup, int attnum,
|
||||
TupleDesc att);
|
||||
TupleDesc att);
|
||||
extern Datum heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
|
||||
bool *isnull);
|
||||
bool *isnull);
|
||||
extern Datum getmissingattr(TupleDesc tupleDesc,
|
||||
int attnum, bool *isnull);
|
||||
int attnum, bool *isnull);
|
||||
extern HeapTuple heap_copytuple(HeapTuple tuple);
|
||||
extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest);
|
||||
extern Datum heap_copy_tuple_as_datum(HeapTuple tuple, TupleDesc tupleDesc);
|
||||
extern HeapTuple heap_form_tuple(TupleDesc tupleDescriptor,
|
||||
Datum *values, bool *isnull);
|
||||
Datum *values, bool *isnull);
|
||||
extern HeapTuple heap_modify_tuple(HeapTuple tuple,
|
||||
TupleDesc tupleDesc,
|
||||
Datum *replValues,
|
||||
bool *replIsnull,
|
||||
bool *doReplace);
|
||||
TupleDesc tupleDesc,
|
||||
Datum *replValues,
|
||||
bool *replIsnull,
|
||||
bool *doReplace);
|
||||
extern HeapTuple heap_modify_tuple_by_cols(HeapTuple tuple,
|
||||
TupleDesc tupleDesc,
|
||||
int nCols,
|
||||
int *replCols,
|
||||
Datum *replValues,
|
||||
bool *replIsnull);
|
||||
TupleDesc tupleDesc,
|
||||
int nCols,
|
||||
int *replCols,
|
||||
Datum *replValues,
|
||||
bool *replIsnull);
|
||||
extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc,
|
||||
Datum *values, bool *isnull);
|
||||
Datum *values, bool *isnull);
|
||||
extern void heap_freetuple(HeapTuple htup);
|
||||
extern MinimalTuple heap_form_minimal_tuple(TupleDesc tupleDescriptor,
|
||||
Datum *values, bool *isnull);
|
||||
Datum *values, bool *isnull);
|
||||
extern void heap_free_minimal_tuple(MinimalTuple mtup);
|
||||
extern MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup);
|
||||
extern HeapTuple heap_tuple_from_minimal_tuple(MinimalTuple mtup);
|
||||
|
@@ -149,13 +149,13 @@ typedef IndexAttributeBitMapData * IndexAttributeBitMap;
|
||||
|
||||
/* routines in indextuple.c */
|
||||
extern IndexTuple index_form_tuple(TupleDesc tupleDescriptor,
|
||||
Datum *values, bool *isnull);
|
||||
Datum *values, bool *isnull);
|
||||
extern Datum nocache_index_getattr(IndexTuple tup, int attnum,
|
||||
TupleDesc tupleDesc);
|
||||
TupleDesc tupleDesc);
|
||||
extern void index_deform_tuple(IndexTuple tup, TupleDesc tupleDescriptor,
|
||||
Datum *values, bool *isnull);
|
||||
Datum *values, bool *isnull);
|
||||
extern IndexTuple CopyIndexTuple(IndexTuple source);
|
||||
extern IndexTuple index_truncate_tuple(TupleDesc sourceDescriptor,
|
||||
IndexTuple source, int leavenatts);
|
||||
IndexTuple source, int leavenatts);
|
||||
|
||||
#endif /* ITUP_H */
|
||||
|
@@ -100,21 +100,21 @@ typedef struct xl_multixact_truncate
|
||||
|
||||
|
||||
extern MultiXactId MultiXactIdCreate(TransactionId xid1,
|
||||
MultiXactStatus status1, TransactionId xid2,
|
||||
MultiXactStatus status2);
|
||||
MultiXactStatus status1, TransactionId xid2,
|
||||
MultiXactStatus status2);
|
||||
extern MultiXactId MultiXactIdExpand(MultiXactId multi, TransactionId xid,
|
||||
MultiXactStatus status);
|
||||
MultiXactStatus status);
|
||||
extern MultiXactId MultiXactIdCreateFromMembers(int nmembers,
|
||||
MultiXactMember *members);
|
||||
MultiXactMember *members);
|
||||
|
||||
extern MultiXactId ReadNextMultiXactId(void);
|
||||
extern bool MultiXactIdIsRunning(MultiXactId multi, bool isLockOnly);
|
||||
extern void MultiXactIdSetOldestMember(void);
|
||||
extern int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **xids,
|
||||
bool allow_old, bool isLockOnly);
|
||||
extern int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **xids,
|
||||
bool allow_old, bool isLockOnly);
|
||||
extern bool MultiXactIdPrecedes(MultiXactId multi1, MultiXactId multi2);
|
||||
extern bool MultiXactIdPrecedesOrEquals(MultiXactId multi1,
|
||||
MultiXactId multi2);
|
||||
MultiXactId multi2);
|
||||
|
||||
extern void AtEOXact_MultiXact(void);
|
||||
extern void AtPrepare_MultiXact(void);
|
||||
@@ -127,34 +127,34 @@ extern void StartupMultiXact(void);
|
||||
extern void TrimMultiXact(void);
|
||||
extern void ShutdownMultiXact(void);
|
||||
extern void SetMultiXactIdLimit(MultiXactId oldest_datminmxid,
|
||||
Oid oldest_datoid,
|
||||
bool is_startup);
|
||||
Oid oldest_datoid,
|
||||
bool is_startup);
|
||||
extern void MultiXactGetCheckptMulti(bool is_shutdown,
|
||||
MultiXactId *nextMulti,
|
||||
MultiXactOffset *nextMultiOffset,
|
||||
MultiXactId *oldestMulti,
|
||||
Oid *oldestMultiDB);
|
||||
MultiXactId *nextMulti,
|
||||
MultiXactOffset *nextMultiOffset,
|
||||
MultiXactId *oldestMulti,
|
||||
Oid *oldestMultiDB);
|
||||
extern void CheckPointMultiXact(void);
|
||||
extern MultiXactId GetOldestMultiXactId(void);
|
||||
extern void TruncateMultiXact(MultiXactId oldestMulti, Oid oldestMultiDB);
|
||||
extern void MultiXactSetNextMXact(MultiXactId nextMulti,
|
||||
MultiXactOffset nextMultiOffset);
|
||||
MultiXactOffset nextMultiOffset);
|
||||
extern void MultiXactAdvanceNextMXact(MultiXactId minMulti,
|
||||
MultiXactOffset minMultiOffset);
|
||||
MultiXactOffset minMultiOffset);
|
||||
extern void MultiXactAdvanceOldest(MultiXactId oldestMulti, Oid oldestMultiDB);
|
||||
extern int MultiXactMemberFreezeThreshold(void);
|
||||
|
||||
extern void multixact_twophase_recover(TransactionId xid, uint16 info,
|
||||
void *recdata, uint32 len);
|
||||
void *recdata, uint32 len);
|
||||
extern void multixact_twophase_postcommit(TransactionId xid, uint16 info,
|
||||
void *recdata, uint32 len);
|
||||
void *recdata, uint32 len);
|
||||
extern void multixact_twophase_postabort(TransactionId xid, uint16 info,
|
||||
void *recdata, uint32 len);
|
||||
void *recdata, uint32 len);
|
||||
|
||||
extern void multixact_redo(XLogReaderState *record);
|
||||
extern void multixact_desc(StringInfo buf, XLogReaderState *record);
|
||||
extern const char *multixact_identify(uint8 info);
|
||||
extern char *mxid_to_string(MultiXactId multi, int nmembers,
|
||||
MultiXactMember *members);
|
||||
MultiXactMember *members);
|
||||
|
||||
#endif /* MULTIXACT_H */
|
||||
|
@@ -696,26 +696,26 @@ typedef BTScanOpaqueData *BTScanOpaque;
|
||||
*/
|
||||
extern void btbuildempty(Relation index);
|
||||
extern bool btinsert(Relation rel, Datum *values, bool *isnull,
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
extern IndexScanDesc btbeginscan(Relation rel, int nkeys, int norderbys);
|
||||
extern Size btestimateparallelscan(void);
|
||||
extern void btinitparallelscan(void *target);
|
||||
extern bool btgettuple(IndexScanDesc scan, ScanDirection dir);
|
||||
extern int64 btgetbitmap(IndexScanDesc scan, TIDBitmap *tbm);
|
||||
extern void btrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys,
|
||||
ScanKey orderbys, int norderbys);
|
||||
ScanKey orderbys, int norderbys);
|
||||
extern void btparallelrescan(IndexScanDesc scan);
|
||||
extern void btendscan(IndexScanDesc scan);
|
||||
extern void btmarkpos(IndexScanDesc scan);
|
||||
extern void btrestrpos(IndexScanDesc scan);
|
||||
extern IndexBulkDeleteResult *btbulkdelete(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
extern IndexBulkDeleteResult *btvacuumcleanup(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats);
|
||||
IndexBulkDeleteResult *stats);
|
||||
extern bool btcanreturn(Relation index, int attno);
|
||||
|
||||
/*
|
||||
@@ -730,7 +730,7 @@ extern void _bt_parallel_advance_array_keys(IndexScanDesc scan);
|
||||
* prototypes for functions in nbtinsert.c
|
||||
*/
|
||||
extern bool _bt_doinsert(Relation rel, IndexTuple itup,
|
||||
IndexUniqueCheck checkUnique, Relation heapRel);
|
||||
IndexUniqueCheck checkUnique, Relation heapRel);
|
||||
extern Buffer _bt_getstackbuf(Relation rel, BTStack stack);
|
||||
extern void _bt_finish_split(Relation rel, Buffer bbuf, BTStack stack);
|
||||
|
||||
@@ -738,15 +738,15 @@ extern void _bt_finish_split(Relation rel, Buffer bbuf, BTStack stack);
|
||||
* prototypes for functions in nbtsplitloc.c
|
||||
*/
|
||||
extern OffsetNumber _bt_findsplitloc(Relation rel, Page page,
|
||||
OffsetNumber newitemoff, Size newitemsz, IndexTuple newitem,
|
||||
bool *newitemonleft);
|
||||
OffsetNumber newitemoff, Size newitemsz, IndexTuple newitem,
|
||||
bool *newitemonleft);
|
||||
|
||||
/*
|
||||
* prototypes for functions in nbtpage.c
|
||||
*/
|
||||
extern void _bt_initmetapage(Page page, BlockNumber rootbknum, uint32 level);
|
||||
extern void _bt_update_meta_cleanup_info(Relation rel,
|
||||
TransactionId oldestBtpoXact, float8 numHeapTuples);
|
||||
TransactionId oldestBtpoXact, float8 numHeapTuples);
|
||||
extern void _bt_upgrademetapage(Page page);
|
||||
extern Buffer _bt_getroot(Relation rel, int access);
|
||||
extern Buffer _bt_gettrueroot(Relation rel);
|
||||
@@ -755,30 +755,30 @@ extern bool _bt_heapkeyspace(Relation rel);
|
||||
extern void _bt_checkpage(Relation rel, Buffer buf);
|
||||
extern Buffer _bt_getbuf(Relation rel, BlockNumber blkno, int access);
|
||||
extern Buffer _bt_relandgetbuf(Relation rel, Buffer obuf,
|
||||
BlockNumber blkno, int access);
|
||||
BlockNumber blkno, int access);
|
||||
extern void _bt_relbuf(Relation rel, Buffer buf);
|
||||
extern void _bt_pageinit(Page page, Size size);
|
||||
extern bool _bt_page_recyclable(Page page);
|
||||
extern void _bt_delitems_delete(Relation rel, Buffer buf,
|
||||
OffsetNumber *itemnos, int nitems, Relation heapRel);
|
||||
OffsetNumber *itemnos, int nitems, Relation heapRel);
|
||||
extern void _bt_delitems_vacuum(Relation rel, Buffer buf,
|
||||
OffsetNumber *itemnos, int nitems,
|
||||
BlockNumber lastBlockVacuumed);
|
||||
OffsetNumber *itemnos, int nitems,
|
||||
BlockNumber lastBlockVacuumed);
|
||||
extern int _bt_pagedel(Relation rel, Buffer buf);
|
||||
|
||||
/*
|
||||
* prototypes for functions in nbtsearch.c
|
||||
*/
|
||||
extern BTStack _bt_search(Relation rel, BTScanInsert key, Buffer *bufP,
|
||||
int access, Snapshot snapshot);
|
||||
int access, Snapshot snapshot);
|
||||
extern Buffer _bt_moveright(Relation rel, BTScanInsert key, Buffer buf,
|
||||
bool forupdate, BTStack stack, int access, Snapshot snapshot);
|
||||
bool forupdate, BTStack stack, int access, Snapshot snapshot);
|
||||
extern OffsetNumber _bt_binsrch_insert(Relation rel, BTInsertState insertstate);
|
||||
extern int32 _bt_compare(Relation rel, BTScanInsert key, Page page, OffsetNumber offnum);
|
||||
extern bool _bt_first(IndexScanDesc scan, ScanDirection dir);
|
||||
extern bool _bt_next(IndexScanDesc scan, ScanDirection dir);
|
||||
extern Buffer _bt_get_endpoint(Relation rel, uint32 level, bool rightmost,
|
||||
Snapshot snapshot);
|
||||
Snapshot snapshot);
|
||||
|
||||
/*
|
||||
* prototypes for functions in nbtutils.c
|
||||
@@ -792,7 +792,7 @@ extern void _bt_mark_array_keys(IndexScanDesc scan);
|
||||
extern void _bt_restore_array_keys(IndexScanDesc scan);
|
||||
extern void _bt_preprocess_keys(IndexScanDesc scan);
|
||||
extern bool _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple,
|
||||
int tupnatts, ScanDirection dir, bool *continuescan);
|
||||
int tupnatts, ScanDirection dir, bool *continuescan);
|
||||
extern void _bt_killitems(IndexScanDesc scan);
|
||||
extern BTCycleId _bt_vacuum_cycleid(Relation rel);
|
||||
extern BTCycleId _bt_start_vacuum(Relation rel);
|
||||
@@ -802,17 +802,17 @@ extern Size BTreeShmemSize(void);
|
||||
extern void BTreeShmemInit(void);
|
||||
extern bytea *btoptions(Datum reloptions, bool validate);
|
||||
extern bool btproperty(Oid index_oid, int attno,
|
||||
IndexAMProperty prop, const char *propname,
|
||||
bool *res, bool *isnull);
|
||||
IndexAMProperty prop, const char *propname,
|
||||
bool *res, bool *isnull);
|
||||
extern char *btbuildphasename(int64 phasenum);
|
||||
extern IndexTuple _bt_truncate(Relation rel, IndexTuple lastleft,
|
||||
IndexTuple firstright, BTScanInsert itup_key);
|
||||
extern int _bt_keep_natts_fast(Relation rel, IndexTuple lastleft,
|
||||
IndexTuple firstright);
|
||||
IndexTuple firstright, BTScanInsert itup_key);
|
||||
extern int _bt_keep_natts_fast(Relation rel, IndexTuple lastleft,
|
||||
IndexTuple firstright);
|
||||
extern bool _bt_check_natts(Relation rel, bool heapkeyspace, Page page,
|
||||
OffsetNumber offnum);
|
||||
OffsetNumber offnum);
|
||||
extern void _bt_check_third_page(Relation rel, Relation heap,
|
||||
bool needheaptidspace, Page page, IndexTuple newtup);
|
||||
bool needheaptidspace, Page page, IndexTuple newtup);
|
||||
|
||||
/*
|
||||
* prototypes for functions in nbtvalidate.c
|
||||
@@ -823,7 +823,7 @@ extern bool btvalidate(Oid opclassoid);
|
||||
* prototypes for functions in nbtsort.c
|
||||
*/
|
||||
extern IndexBuildResult *btbuild(Relation heap, Relation index,
|
||||
struct IndexInfo *indexInfo);
|
||||
struct IndexInfo *indexInfo);
|
||||
extern void _bt_parallel_build_main(dsm_segment *seg, shm_toc *toc);
|
||||
|
||||
#endif /* NBTREE_H */
|
||||
|
@@ -60,7 +60,7 @@ extern PGDLLIMPORT bool InitializingParallelWorker;
|
||||
#define IsParallelWorker() (ParallelWorkerNumber >= 0)
|
||||
|
||||
extern ParallelContext *CreateParallelContext(const char *library_name,
|
||||
const char *function_name, int nworkers);
|
||||
const char *function_name, int nworkers);
|
||||
extern void InitializeParallelDSM(ParallelContext *pcxt);
|
||||
extern void ReinitializeParallelDSM(ParallelContext *pcxt);
|
||||
extern void LaunchParallelWorkers(ParallelContext *pcxt);
|
||||
|
@@ -18,6 +18,6 @@
|
||||
|
||||
extern bool printsimple(TupleTableSlot *slot, DestReceiver *self);
|
||||
extern void printsimple_startup(DestReceiver *self, int operation,
|
||||
TupleDesc tupdesc);
|
||||
TupleDesc tupdesc);
|
||||
|
||||
#endif /* PRINTSIMPLE_H */
|
||||
|
@@ -21,15 +21,15 @@ extern DestReceiver *printtup_create_DR(CommandDest dest);
|
||||
extern void SetRemoteDestReceiverParams(DestReceiver *self, Portal portal);
|
||||
|
||||
extern void SendRowDescriptionMessage(StringInfo buf,
|
||||
TupleDesc typeinfo, List *targetlist, int16 *formats);
|
||||
TupleDesc typeinfo, List *targetlist, int16 *formats);
|
||||
|
||||
extern void debugStartup(DestReceiver *self, int operation,
|
||||
TupleDesc typeinfo);
|
||||
TupleDesc typeinfo);
|
||||
extern bool debugtup(TupleTableSlot *slot, DestReceiver *self);
|
||||
|
||||
/* XXX these are really in executor/spi.c */
|
||||
extern void spi_dest_startup(DestReceiver *self, int operation,
|
||||
TupleDesc typeinfo);
|
||||
TupleDesc typeinfo);
|
||||
extern bool spi_printtup(TupleTableSlot *slot, DestReceiver *self);
|
||||
|
||||
#endif /* PRINTTUP_H */
|
||||
|
@@ -23,7 +23,7 @@ extern Relation relation_open(Oid relationId, LOCKMODE lockmode);
|
||||
extern Relation try_relation_open(Oid relationId, LOCKMODE lockmode);
|
||||
extern Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode);
|
||||
extern Relation relation_openrv_extended(const RangeVar *relation,
|
||||
LOCKMODE lockmode, bool missing_ok);
|
||||
LOCKMODE lockmode, bool missing_ok);
|
||||
extern void relation_close(Relation relation, LOCKMODE lockmode);
|
||||
|
||||
#endif /* ACCESS_RELATION_H */
|
||||
|
@@ -247,35 +247,35 @@ typedef struct
|
||||
|
||||
extern relopt_kind add_reloption_kind(void);
|
||||
extern void add_bool_reloption(bits32 kinds, const char *name, const char *desc,
|
||||
bool default_val);
|
||||
bool default_val);
|
||||
extern void add_int_reloption(bits32 kinds, const char *name, const char *desc,
|
||||
int default_val, int min_val, int max_val);
|
||||
int default_val, int min_val, int max_val);
|
||||
extern void add_real_reloption(bits32 kinds, const char *name, const char *desc,
|
||||
double default_val, double min_val, double max_val);
|
||||
double default_val, double min_val, double max_val);
|
||||
extern void add_string_reloption(bits32 kinds, const char *name, const char *desc,
|
||||
const char *default_val, validate_string_relopt validator);
|
||||
const char *default_val, validate_string_relopt validator);
|
||||
|
||||
extern Datum transformRelOptions(Datum oldOptions, List *defList,
|
||||
const char *namspace, char *validnsps[],
|
||||
bool acceptOidsOff, bool isReset);
|
||||
const char *namspace, char *validnsps[],
|
||||
bool acceptOidsOff, bool isReset);
|
||||
extern List *untransformRelOptions(Datum options);
|
||||
extern bytea *extractRelOptions(HeapTuple tuple, TupleDesc tupdesc,
|
||||
amoptions_function amoptions);
|
||||
amoptions_function amoptions);
|
||||
extern relopt_value *parseRelOptions(Datum options, bool validate,
|
||||
relopt_kind kind, int *numrelopts);
|
||||
relopt_kind kind, int *numrelopts);
|
||||
extern void *allocateReloptStruct(Size base, relopt_value *options,
|
||||
int numoptions);
|
||||
int numoptions);
|
||||
extern void fillRelOptions(void *rdopts, Size basesize,
|
||||
relopt_value *options, int numoptions,
|
||||
bool validate,
|
||||
const relopt_parse_elt *elems, int nelems);
|
||||
relopt_value *options, int numoptions,
|
||||
bool validate,
|
||||
const relopt_parse_elt *elems, int nelems);
|
||||
|
||||
extern bytea *default_reloptions(Datum reloptions, bool validate,
|
||||
relopt_kind kind);
|
||||
relopt_kind kind);
|
||||
extern bytea *heap_reloptions(char relkind, Datum reloptions, bool validate);
|
||||
extern bytea *view_reloptions(Datum reloptions, bool validate);
|
||||
extern bytea *index_reloptions(amoptions_function amoptions, Datum reloptions,
|
||||
bool validate);
|
||||
bool validate);
|
||||
extern bytea *attribute_reloptions(Datum reloptions, bool validate);
|
||||
extern bytea *tablespace_reloptions(Datum reloptions, bool validate);
|
||||
extern LOCKMODE AlterTableGetRelOptionsLockLevel(List *defList);
|
||||
|
@@ -22,11 +22,11 @@
|
||||
typedef struct RewriteStateData *RewriteState;
|
||||
|
||||
extern RewriteState begin_heap_rewrite(Relation OldHeap, Relation NewHeap,
|
||||
TransactionId OldestXmin, TransactionId FreezeXid,
|
||||
MultiXactId MultiXactCutoff, bool use_wal);
|
||||
TransactionId OldestXmin, TransactionId FreezeXid,
|
||||
MultiXactId MultiXactCutoff, bool use_wal);
|
||||
extern void end_heap_rewrite(RewriteState state);
|
||||
extern void rewrite_heap_tuple(RewriteState state, HeapTuple oldTuple,
|
||||
HeapTuple newTuple);
|
||||
HeapTuple newTuple);
|
||||
extern bool rewrite_heap_dead_tuple(RewriteState state, HeapTuple oldTuple);
|
||||
|
||||
/*
|
||||
|
@@ -127,25 +127,25 @@ typedef ScanKeyData *ScanKey;
|
||||
* prototypes for functions in access/common/scankey.c
|
||||
*/
|
||||
extern void ScanKeyInit(ScanKey entry,
|
||||
AttrNumber attributeNumber,
|
||||
StrategyNumber strategy,
|
||||
RegProcedure procedure,
|
||||
Datum argument);
|
||||
AttrNumber attributeNumber,
|
||||
StrategyNumber strategy,
|
||||
RegProcedure procedure,
|
||||
Datum argument);
|
||||
extern void ScanKeyEntryInitialize(ScanKey entry,
|
||||
int flags,
|
||||
AttrNumber attributeNumber,
|
||||
StrategyNumber strategy,
|
||||
Oid subtype,
|
||||
Oid collation,
|
||||
RegProcedure procedure,
|
||||
Datum argument);
|
||||
int flags,
|
||||
AttrNumber attributeNumber,
|
||||
StrategyNumber strategy,
|
||||
Oid subtype,
|
||||
Oid collation,
|
||||
RegProcedure procedure,
|
||||
Datum argument);
|
||||
extern void ScanKeyEntryInitializeWithInfo(ScanKey entry,
|
||||
int flags,
|
||||
AttrNumber attributeNumber,
|
||||
StrategyNumber strategy,
|
||||
Oid subtype,
|
||||
Oid collation,
|
||||
FmgrInfo *finfo,
|
||||
Datum argument);
|
||||
int flags,
|
||||
AttrNumber attributeNumber,
|
||||
StrategyNumber strategy,
|
||||
Oid subtype,
|
||||
Oid collation,
|
||||
FmgrInfo *finfo,
|
||||
Datum argument);
|
||||
|
||||
#endif /* SKEY_H */
|
||||
|
@@ -139,12 +139,12 @@ typedef SlruCtlData *SlruCtl;
|
||||
|
||||
extern Size SimpleLruShmemSize(int nslots, int nlsns);
|
||||
extern void SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns,
|
||||
LWLock *ctllock, const char *subdir, int tranche_id);
|
||||
LWLock *ctllock, const char *subdir, int tranche_id);
|
||||
extern int SimpleLruZeroPage(SlruCtl ctl, int pageno);
|
||||
extern int SimpleLruReadPage(SlruCtl ctl, int pageno, bool write_ok,
|
||||
TransactionId xid);
|
||||
extern int SimpleLruReadPage_ReadOnly(SlruCtl ctl, int pageno,
|
||||
TransactionId xid);
|
||||
extern int SimpleLruReadPage(SlruCtl ctl, int pageno, bool write_ok,
|
||||
TransactionId xid);
|
||||
extern int SimpleLruReadPage_ReadOnly(SlruCtl ctl, int pageno,
|
||||
TransactionId xid);
|
||||
extern void SimpleLruWritePage(SlruCtl ctl, int slotno);
|
||||
extern void SimpleLruFlush(SlruCtl ctl, bool allow_redirtied);
|
||||
extern void SimpleLruTruncate(SlruCtl ctl, int cutoffPage);
|
||||
@@ -157,8 +157,8 @@ extern void SlruDeleteSegment(SlruCtl ctl, int segno);
|
||||
|
||||
/* SlruScanDirectory public callbacks */
|
||||
extern bool SlruScanDirCbReportPresence(SlruCtl ctl, char *filename,
|
||||
int segpage, void *data);
|
||||
int segpage, void *data);
|
||||
extern bool SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage,
|
||||
void *data);
|
||||
void *data);
|
||||
|
||||
#endif /* SLRU_H */
|
||||
|
@@ -198,29 +198,29 @@ extern bytea *spgoptions(Datum reloptions, bool validate);
|
||||
|
||||
/* spginsert.c */
|
||||
extern IndexBuildResult *spgbuild(Relation heap, Relation index,
|
||||
struct IndexInfo *indexInfo);
|
||||
struct IndexInfo *indexInfo);
|
||||
extern void spgbuildempty(Relation index);
|
||||
extern bool spginsert(Relation index, Datum *values, bool *isnull,
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
ItemPointer ht_ctid, Relation heapRel,
|
||||
IndexUniqueCheck checkUnique,
|
||||
struct IndexInfo *indexInfo);
|
||||
|
||||
/* spgscan.c */
|
||||
extern IndexScanDesc spgbeginscan(Relation rel, int keysz, int orderbysz);
|
||||
extern void spgendscan(IndexScanDesc scan);
|
||||
extern void spgrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys,
|
||||
ScanKey orderbys, int norderbys);
|
||||
ScanKey orderbys, int norderbys);
|
||||
extern int64 spggetbitmap(IndexScanDesc scan, TIDBitmap *tbm);
|
||||
extern bool spggettuple(IndexScanDesc scan, ScanDirection dir);
|
||||
extern bool spgcanreturn(Relation index, int attno);
|
||||
|
||||
/* spgvacuum.c */
|
||||
extern IndexBulkDeleteResult *spgbulkdelete(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
IndexBulkDeleteResult *stats,
|
||||
IndexBulkDeleteCallback callback,
|
||||
void *callback_state);
|
||||
extern IndexBulkDeleteResult *spgvacuumcleanup(IndexVacuumInfo *info,
|
||||
IndexBulkDeleteResult *stats);
|
||||
IndexBulkDeleteResult *stats);
|
||||
|
||||
/* spgvalidate.c */
|
||||
extern bool spgvalidate(Oid opclassoid);
|
||||
|
@@ -422,45 +422,45 @@ extern void initSpGistState(SpGistState *state, Relation index);
|
||||
extern Buffer SpGistNewBuffer(Relation index);
|
||||
extern void SpGistUpdateMetaPage(Relation index);
|
||||
extern Buffer SpGistGetBuffer(Relation index, int flags,
|
||||
int needSpace, bool *isNew);
|
||||
int needSpace, bool *isNew);
|
||||
extern void SpGistSetLastUsedPage(Relation index, Buffer buffer);
|
||||
extern void SpGistInitPage(Page page, uint16 f);
|
||||
extern void SpGistInitBuffer(Buffer b, uint16 f);
|
||||
extern void SpGistInitMetapage(Page page);
|
||||
extern unsigned int SpGistGetTypeSize(SpGistTypeDesc *att, Datum datum);
|
||||
extern SpGistLeafTuple spgFormLeafTuple(SpGistState *state,
|
||||
ItemPointer heapPtr,
|
||||
Datum datum, bool isnull);
|
||||
ItemPointer heapPtr,
|
||||
Datum datum, bool isnull);
|
||||
extern SpGistNodeTuple spgFormNodeTuple(SpGistState *state,
|
||||
Datum label, bool isnull);
|
||||
Datum label, bool isnull);
|
||||
extern SpGistInnerTuple spgFormInnerTuple(SpGistState *state,
|
||||
bool hasPrefix, Datum prefix,
|
||||
int nNodes, SpGistNodeTuple *nodes);
|
||||
bool hasPrefix, Datum prefix,
|
||||
int nNodes, SpGistNodeTuple *nodes);
|
||||
extern SpGistDeadTuple spgFormDeadTuple(SpGistState *state, int tupstate,
|
||||
BlockNumber blkno, OffsetNumber offnum);
|
||||
BlockNumber blkno, OffsetNumber offnum);
|
||||
extern Datum *spgExtractNodeLabels(SpGistState *state,
|
||||
SpGistInnerTuple innerTuple);
|
||||
SpGistInnerTuple innerTuple);
|
||||
extern OffsetNumber SpGistPageAddNewItem(SpGistState *state, Page page,
|
||||
Item item, Size size,
|
||||
OffsetNumber *startOffset,
|
||||
bool errorOK);
|
||||
Item item, Size size,
|
||||
OffsetNumber *startOffset,
|
||||
bool errorOK);
|
||||
extern bool spgproperty(Oid index_oid, int attno,
|
||||
IndexAMProperty prop, const char *propname,
|
||||
bool *res, bool *isnull);
|
||||
IndexAMProperty prop, const char *propname,
|
||||
bool *res, bool *isnull);
|
||||
|
||||
/* spgdoinsert.c */
|
||||
extern void spgUpdateNodeLink(SpGistInnerTuple tup, int nodeN,
|
||||
BlockNumber blkno, OffsetNumber offset);
|
||||
BlockNumber blkno, OffsetNumber offset);
|
||||
extern void spgPageIndexMultiDelete(SpGistState *state, Page page,
|
||||
OffsetNumber *itemnos, int nitems,
|
||||
int firststate, int reststate,
|
||||
BlockNumber blkno, OffsetNumber offnum);
|
||||
OffsetNumber *itemnos, int nitems,
|
||||
int firststate, int reststate,
|
||||
BlockNumber blkno, OffsetNumber offnum);
|
||||
extern bool spgdoinsert(Relation index, SpGistState *state,
|
||||
ItemPointer heapPtr, Datum datum, bool isnull);
|
||||
ItemPointer heapPtr, Datum datum, bool isnull);
|
||||
|
||||
/* spgproc.c */
|
||||
extern double *spg_key_orderbys_distances(Datum key, bool isLeaf,
|
||||
ScanKey orderbys, int norderbys);
|
||||
ScanKey orderbys, int norderbys);
|
||||
extern BOX *box_copy(BOX *orig);
|
||||
|
||||
#endif /* SPGIST_PRIVATE_H */
|
||||
|
@@ -22,7 +22,7 @@
|
||||
extern Relation table_open(Oid relationId, LOCKMODE lockmode);
|
||||
extern Relation table_openrv(const RangeVar *relation, LOCKMODE lockmode);
|
||||
extern Relation table_openrv_extended(const RangeVar *relation,
|
||||
LOCKMODE lockmode, bool missing_ok);
|
||||
LOCKMODE lockmode, bool missing_ok);
|
||||
extern void table_close(Relation relation, LOCKMODE lockmode);
|
||||
|
||||
/*
|
||||
|
@@ -748,7 +748,7 @@ table_beginscan(Relation rel, Snapshot snapshot,
|
||||
* snapshot appropriate for scanning catalog relations.
|
||||
*/
|
||||
extern TableScanDesc table_beginscan_catalog(Relation rel, int nkeys,
|
||||
struct ScanKeyData *key);
|
||||
struct ScanKeyData *key);
|
||||
|
||||
/*
|
||||
* Like table_beginscan(), but table_beginscan_strat() offers an extended API
|
||||
@@ -895,8 +895,8 @@ extern Size table_parallelscan_estimate(Relation rel, Snapshot snapshot);
|
||||
* individual workers attach via table_beginscan_parallel.
|
||||
*/
|
||||
extern void table_parallelscan_initialize(Relation rel,
|
||||
ParallelTableScanDesc pscan,
|
||||
Snapshot snapshot);
|
||||
ParallelTableScanDesc pscan,
|
||||
Snapshot snapshot);
|
||||
|
||||
/*
|
||||
* Begin a parallel scan. `pscan` needs to have been initialized with
|
||||
@@ -906,7 +906,7 @@ extern void table_parallelscan_initialize(Relation rel,
|
||||
* Caller must hold a suitable lock on the relation.
|
||||
*/
|
||||
extern TableScanDesc table_beginscan_parallel(Relation rel,
|
||||
ParallelTableScanDesc pscan);
|
||||
ParallelTableScanDesc pscan);
|
||||
|
||||
/*
|
||||
* Restart a parallel scan. Call this in the leader process. Caller is
|
||||
@@ -998,9 +998,9 @@ table_index_fetch_tuple(struct IndexFetchTableData *scan,
|
||||
* unique index.
|
||||
*/
|
||||
extern bool table_index_fetch_tuple_check(Relation rel,
|
||||
ItemPointer tid,
|
||||
Snapshot snapshot,
|
||||
bool *all_dead);
|
||||
ItemPointer tid,
|
||||
Snapshot snapshot,
|
||||
bool *all_dead);
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
@@ -1705,10 +1705,10 @@ table_scan_sample_next_tuple(TableScanDesc scan,
|
||||
|
||||
extern void simple_table_insert(Relation rel, TupleTableSlot *slot);
|
||||
extern void simple_table_delete(Relation rel, ItemPointer tid,
|
||||
Snapshot snapshot);
|
||||
Snapshot snapshot);
|
||||
extern void simple_table_update(Relation rel, ItemPointer otid,
|
||||
TupleTableSlot *slot, Snapshot snapshot,
|
||||
bool *update_indexes);
|
||||
TupleTableSlot *slot, Snapshot snapshot,
|
||||
bool *update_indexes);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
@@ -1718,13 +1718,13 @@ extern void simple_table_update(Relation rel, ItemPointer otid,
|
||||
|
||||
extern Size table_block_parallelscan_estimate(Relation rel);
|
||||
extern Size table_block_parallelscan_initialize(Relation rel,
|
||||
ParallelTableScanDesc pscan);
|
||||
ParallelTableScanDesc pscan);
|
||||
extern void table_block_parallelscan_reinitialize(Relation rel,
|
||||
ParallelTableScanDesc pscan);
|
||||
ParallelTableScanDesc pscan);
|
||||
extern BlockNumber table_block_parallelscan_nextpage(Relation rel,
|
||||
ParallelBlockTableScanDesc pbscan);
|
||||
ParallelBlockTableScanDesc pbscan);
|
||||
extern void table_block_parallelscan_startblock_init(Relation rel,
|
||||
ParallelBlockTableScanDesc pbscan);
|
||||
ParallelBlockTableScanDesc pbscan);
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
@@ -1735,6 +1735,6 @@ extern void table_block_parallelscan_startblock_init(Relation rel,
|
||||
extern const TableAmRoutine *GetTableAmRoutine(Oid amhandler);
|
||||
extern const TableAmRoutine *GetHeapamTableAmRoutine(void);
|
||||
extern bool check_default_table_access_method(char **newval, void **extra,
|
||||
GucSource source);
|
||||
GucSource source);
|
||||
|
||||
#endif /* TABLEAM_H */
|
||||
|
@@ -33,12 +33,12 @@ extern List *readTimeLineHistory(TimeLineID targetTLI);
|
||||
extern bool existsTimeLineHistory(TimeLineID probeTLI);
|
||||
extern TimeLineID findNewestTimeLine(TimeLineID startTLI);
|
||||
extern void writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
|
||||
XLogRecPtr switchpoint, char *reason);
|
||||
XLogRecPtr switchpoint, char *reason);
|
||||
extern void writeTimeLineHistoryFile(TimeLineID tli, char *content, int size);
|
||||
extern void restoreTimeLineHistoryFiles(TimeLineID begin, TimeLineID end);
|
||||
extern bool tliInHistory(TimeLineID tli, List *expectedTLIs);
|
||||
extern TimeLineID tliOfPointInHistory(XLogRecPtr ptr, List *history);
|
||||
extern XLogRecPtr tliSwitchPoint(TimeLineID tli, List *history,
|
||||
TimeLineID *nextTLI);
|
||||
TimeLineID *nextTLI);
|
||||
|
||||
#endif /* TIMELINE_H */
|
||||
|
@@ -218,7 +218,7 @@ extern bool TransactionIdPrecedesOrEquals(TransactionId id1, TransactionId id2);
|
||||
extern bool TransactionIdFollows(TransactionId id1, TransactionId id2);
|
||||
extern bool TransactionIdFollowsOrEquals(TransactionId id1, TransactionId id2);
|
||||
extern TransactionId TransactionIdLatest(TransactionId mainxid,
|
||||
int nxids, const TransactionId *xids);
|
||||
int nxids, const TransactionId *xids);
|
||||
extern XLogRecPtr TransactionIdGetCommitLSN(TransactionId xid);
|
||||
|
||||
/* in transam/varsup.c */
|
||||
@@ -226,7 +226,7 @@ extern FullTransactionId GetNewTransactionId(bool isSubXact);
|
||||
extern void AdvanceNextFullTransactionIdPastXid(TransactionId xid);
|
||||
extern FullTransactionId ReadNextFullTransactionId(void);
|
||||
extern void SetTransactionIdLimit(TransactionId oldest_datfrozenxid,
|
||||
Oid oldest_datoid);
|
||||
Oid oldest_datoid);
|
||||
extern void AdvanceOldestClogXid(TransactionId oldest_datfrozenxid);
|
||||
extern bool ForceTransactionIdLimitUpdate(void);
|
||||
extern Oid GetNewObjectId(void);
|
||||
|
@@ -32,23 +32,23 @@ typedef struct TupleConversionMap
|
||||
|
||||
|
||||
extern TupleConversionMap *convert_tuples_by_position(TupleDesc indesc,
|
||||
TupleDesc outdesc,
|
||||
const char *msg);
|
||||
TupleDesc outdesc,
|
||||
const char *msg);
|
||||
|
||||
extern TupleConversionMap *convert_tuples_by_name(TupleDesc indesc,
|
||||
TupleDesc outdesc,
|
||||
const char *msg);
|
||||
TupleDesc outdesc,
|
||||
const char *msg);
|
||||
|
||||
extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
|
||||
TupleDesc outdesc,
|
||||
const char *msg);
|
||||
TupleDesc outdesc,
|
||||
const char *msg);
|
||||
extern AttrNumber *convert_tuples_by_name_map_if_req(TupleDesc indesc,
|
||||
TupleDesc outdesc,
|
||||
const char *msg);
|
||||
TupleDesc outdesc,
|
||||
const char *msg);
|
||||
|
||||
extern HeapTuple execute_attr_map_tuple(HeapTuple tuple, TupleConversionMap *map);
|
||||
extern TupleTableSlot *execute_attr_map_slot(AttrNumber *attrMap,
|
||||
TupleTableSlot *in_slot, TupleTableSlot *out_slot);
|
||||
TupleTableSlot *in_slot, TupleTableSlot *out_slot);
|
||||
|
||||
extern void free_conversion_map(TupleConversionMap *map);
|
||||
|
||||
|
@@ -106,7 +106,7 @@ extern TupleDesc CreateTupleDescCopyConstr(TupleDesc tupdesc);
|
||||
extern void TupleDescCopy(TupleDesc dst, TupleDesc src);
|
||||
|
||||
extern void TupleDescCopyEntry(TupleDesc dst, AttrNumber dstAttno,
|
||||
TupleDesc src, AttrNumber srcAttno);
|
||||
TupleDesc src, AttrNumber srcAttno);
|
||||
|
||||
extern void FreeTupleDesc(TupleDesc tupdesc);
|
||||
|
||||
@@ -130,22 +130,22 @@ extern bool equalTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2);
|
||||
extern uint32 hashTupleDesc(TupleDesc tupdesc);
|
||||
|
||||
extern void TupleDescInitEntry(TupleDesc desc,
|
||||
AttrNumber attributeNumber,
|
||||
const char *attributeName,
|
||||
Oid oidtypeid,
|
||||
int32 typmod,
|
||||
int attdim);
|
||||
AttrNumber attributeNumber,
|
||||
const char *attributeName,
|
||||
Oid oidtypeid,
|
||||
int32 typmod,
|
||||
int attdim);
|
||||
|
||||
extern void TupleDescInitBuiltinEntry(TupleDesc desc,
|
||||
AttrNumber attributeNumber,
|
||||
const char *attributeName,
|
||||
Oid oidtypeid,
|
||||
int32 typmod,
|
||||
int attdim);
|
||||
AttrNumber attributeNumber,
|
||||
const char *attributeName,
|
||||
Oid oidtypeid,
|
||||
int32 typmod,
|
||||
int attdim);
|
||||
|
||||
extern void TupleDescInitEntryCollation(TupleDesc desc,
|
||||
AttrNumber attributeNumber,
|
||||
Oid collationid);
|
||||
AttrNumber attributeNumber,
|
||||
Oid collationid);
|
||||
|
||||
extern TupleDesc BuildDescForRelation(List *schema);
|
||||
|
||||
|
@@ -133,8 +133,8 @@ do { \
|
||||
* ----------
|
||||
*/
|
||||
extern HeapTuple toast_insert_or_update(Relation rel,
|
||||
HeapTuple newtup, HeapTuple oldtup,
|
||||
int options);
|
||||
HeapTuple newtup, HeapTuple oldtup,
|
||||
int options);
|
||||
|
||||
/* ----------
|
||||
* toast_delete -
|
||||
@@ -171,8 +171,8 @@ extern struct varlena *heap_tuple_untoast_attr(struct varlena *attr);
|
||||
* ----------
|
||||
*/
|
||||
extern struct varlena *heap_tuple_untoast_attr_slice(struct varlena *attr,
|
||||
int32 sliceoffset,
|
||||
int32 slicelength);
|
||||
int32 sliceoffset,
|
||||
int32 slicelength);
|
||||
|
||||
/* ----------
|
||||
* toast_flatten_tuple -
|
||||
@@ -190,8 +190,8 @@ extern HeapTuple toast_flatten_tuple(HeapTuple tup, TupleDesc tupleDesc);
|
||||
* ----------
|
||||
*/
|
||||
extern Datum toast_flatten_tuple_to_datum(HeapTupleHeader tup,
|
||||
uint32 tup_len,
|
||||
TupleDesc tupleDesc);
|
||||
uint32 tup_len,
|
||||
TupleDesc tupleDesc);
|
||||
|
||||
/* ----------
|
||||
* toast_build_flattened_tuple -
|
||||
@@ -201,8 +201,8 @@ extern Datum toast_flatten_tuple_to_datum(HeapTupleHeader tup,
|
||||
* ----------
|
||||
*/
|
||||
extern HeapTuple toast_build_flattened_tuple(TupleDesc tupleDesc,
|
||||
Datum *values,
|
||||
bool *isnull);
|
||||
Datum *values,
|
||||
bool *isnull);
|
||||
|
||||
/* ----------
|
||||
* toast_compress_datum -
|
||||
|
@@ -38,17 +38,17 @@ extern PGPROC *TwoPhaseGetDummyProc(TransactionId xid, bool lock_held);
|
||||
extern BackendId TwoPhaseGetDummyBackendId(TransactionId xid, bool lock_held);
|
||||
|
||||
extern GlobalTransaction MarkAsPreparing(TransactionId xid, const char *gid,
|
||||
TimestampTz prepared_at,
|
||||
Oid owner, Oid databaseid);
|
||||
TimestampTz prepared_at,
|
||||
Oid owner, Oid databaseid);
|
||||
|
||||
extern void StartPrepare(GlobalTransaction gxact);
|
||||
extern void EndPrepare(GlobalTransaction gxact);
|
||||
extern bool StandbyTransactionIdIsPrepared(TransactionId xid);
|
||||
|
||||
extern TransactionId PrescanPreparedTransactions(TransactionId **xids_p,
|
||||
int *nxids_p);
|
||||
int *nxids_p);
|
||||
extern void ParsePrepareRecord(uint8 info, char *xlrec,
|
||||
xl_xact_parsed_prepare *parsed);
|
||||
xl_xact_parsed_prepare *parsed);
|
||||
extern void StandbyRecoverPreparedTransactions(void);
|
||||
extern void RecoverPreparedTransactions(void);
|
||||
|
||||
@@ -57,7 +57,7 @@ extern void CheckPointTwoPhase(XLogRecPtr redo_horizon);
|
||||
extern void FinishPreparedTransaction(const char *gid, bool isCommit);
|
||||
|
||||
extern void PrepareRedoAdd(char *buf, XLogRecPtr start_lsn,
|
||||
XLogRecPtr end_lsn, RepOriginId origin_id);
|
||||
XLogRecPtr end_lsn, RepOriginId origin_id);
|
||||
extern void PrepareRedoRemove(TransactionId xid, bool giveWarning);
|
||||
extern void restoreTwoPhaseData(void);
|
||||
#endif /* TWOPHASE_H */
|
||||
|
@@ -35,6 +35,6 @@ extern const TwoPhaseCallback twophase_standby_recover_callbacks[];
|
||||
|
||||
|
||||
extern void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info,
|
||||
const void *data, uint32 len);
|
||||
const void *data, uint32 len);
|
||||
|
||||
#endif /* TWOPHASE_RMGR_H */
|
||||
|
@@ -35,13 +35,13 @@
|
||||
((visibilitymap_get_status((r), (b), (v)) & VISIBILITYMAP_ALL_FROZEN) != 0)
|
||||
|
||||
extern bool visibilitymap_clear(Relation rel, BlockNumber heapBlk,
|
||||
Buffer vmbuf, uint8 flags);
|
||||
Buffer vmbuf, uint8 flags);
|
||||
extern void visibilitymap_pin(Relation rel, BlockNumber heapBlk,
|
||||
Buffer *vmbuf);
|
||||
Buffer *vmbuf);
|
||||
extern bool visibilitymap_pin_ok(BlockNumber heapBlk, Buffer vmbuf);
|
||||
extern void visibilitymap_set(Relation rel, BlockNumber heapBlk, Buffer heapBuf,
|
||||
XLogRecPtr recptr, Buffer vmBuf, TransactionId cutoff_xid,
|
||||
uint8 flags);
|
||||
XLogRecPtr recptr, Buffer vmBuf, TransactionId cutoff_xid,
|
||||
uint8 flags);
|
||||
extern uint8 visibilitymap_get_status(Relation rel, BlockNumber heapBlk, Buffer *vmbuf);
|
||||
extern void visibilitymap_count(Relation rel, BlockNumber *all_visible, BlockNumber *all_frozen);
|
||||
extern void visibilitymap_truncate(Relation rel, BlockNumber nheapblocks);
|
||||
|
@@ -413,19 +413,19 @@ extern void UnregisterSubXactCallback(SubXactCallback callback, void *arg);
|
||||
extern int xactGetCommittedChildren(TransactionId **ptr);
|
||||
|
||||
extern XLogRecPtr XactLogCommitRecord(TimestampTz commit_time,
|
||||
int nsubxacts, TransactionId *subxacts,
|
||||
int nrels, RelFileNode *rels,
|
||||
int nmsgs, SharedInvalidationMessage *msgs,
|
||||
bool relcacheInval, bool forceSync,
|
||||
int xactflags,
|
||||
TransactionId twophase_xid,
|
||||
const char *twophase_gid);
|
||||
int nsubxacts, TransactionId *subxacts,
|
||||
int nrels, RelFileNode *rels,
|
||||
int nmsgs, SharedInvalidationMessage *msgs,
|
||||
bool relcacheInval, bool forceSync,
|
||||
int xactflags,
|
||||
TransactionId twophase_xid,
|
||||
const char *twophase_gid);
|
||||
|
||||
extern XLogRecPtr XactLogAbortRecord(TimestampTz abort_time,
|
||||
int nsubxacts, TransactionId *subxacts,
|
||||
int nrels, RelFileNode *rels,
|
||||
int xactflags, TransactionId twophase_xid,
|
||||
const char *twophase_gid);
|
||||
int nsubxacts, TransactionId *subxacts,
|
||||
int nrels, RelFileNode *rels,
|
||||
int xactflags, TransactionId twophase_xid,
|
||||
const char *twophase_gid);
|
||||
extern void xact_redo(XLogReaderState *record);
|
||||
|
||||
/* xactdesc.c */
|
||||
|
@@ -257,8 +257,8 @@ extern CheckpointStatsData CheckpointStats;
|
||||
struct XLogRecData;
|
||||
|
||||
extern XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata,
|
||||
XLogRecPtr fpw_lsn,
|
||||
uint8 flags);
|
||||
XLogRecPtr fpw_lsn,
|
||||
uint8 flags);
|
||||
extern void XLogFlush(XLogRecPtr RecPtr);
|
||||
extern bool XLogBackgroundFlush(void);
|
||||
extern bool XLogNeedsFlush(XLogRecPtr RecPtr);
|
||||
@@ -345,11 +345,11 @@ typedef enum SessionBackupState
|
||||
} SessionBackupState;
|
||||
|
||||
extern XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast,
|
||||
TimeLineID *starttli_p, StringInfo labelfile,
|
||||
List **tablespaces, StringInfo tblspcmapfile, bool infotbssize,
|
||||
bool needtblspcmapfile);
|
||||
TimeLineID *starttli_p, StringInfo labelfile,
|
||||
List **tablespaces, StringInfo tblspcmapfile, bool infotbssize,
|
||||
bool needtblspcmapfile);
|
||||
extern XLogRecPtr do_pg_stop_backup(char *labelfile, bool waitforarchive,
|
||||
TimeLineID *stoptli_p);
|
||||
TimeLineID *stoptli_p);
|
||||
extern void do_pg_abort_backup(void);
|
||||
extern SessionBackupState get_backup_status(void);
|
||||
|
||||
|
@@ -320,10 +320,10 @@ extern char *recoveryRestoreCommand;
|
||||
* Prototypes for functions in xlogarchive.c
|
||||
*/
|
||||
extern bool RestoreArchivedFile(char *path, const char *xlogfname,
|
||||
const char *recovername, off_t expectedSize,
|
||||
bool cleanupEnabled);
|
||||
const char *recovername, off_t expectedSize,
|
||||
bool cleanupEnabled);
|
||||
extern void ExecuteRecoveryCommand(const char *command, const char *commandName,
|
||||
bool failOnerror);
|
||||
bool failOnerror);
|
||||
extern void KeepFileRestoredFromArchive(const char *path, const char *xlogfname);
|
||||
extern void XLogArchiveNotify(const char *xlog);
|
||||
extern void XLogArchiveNotifySeg(XLogSegNo segno);
|
||||
|
@@ -46,17 +46,17 @@ extern void XLogEnsureRecordSpace(int nbuffers, int ndatas);
|
||||
extern void XLogRegisterData(char *data, int len);
|
||||
extern void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags);
|
||||
extern void XLogRegisterBlock(uint8 block_id, RelFileNode *rnode,
|
||||
ForkNumber forknum, BlockNumber blknum, char *page,
|
||||
uint8 flags);
|
||||
ForkNumber forknum, BlockNumber blknum, char *page,
|
||||
uint8 flags);
|
||||
extern void XLogRegisterBufData(uint8 block_id, char *data, int len);
|
||||
extern void XLogResetInsertion(void);
|
||||
extern bool XLogCheckBufferNeedsBackup(Buffer buffer);
|
||||
|
||||
extern XLogRecPtr log_newpage(RelFileNode *rnode, ForkNumber forkNum,
|
||||
BlockNumber blk, char *page, bool page_std);
|
||||
BlockNumber blk, char *page, bool page_std);
|
||||
extern XLogRecPtr log_newpage_buffer(Buffer buffer, bool page_std);
|
||||
extern void log_newpage_range(Relation rel, ForkNumber forkNum,
|
||||
BlockNumber startblk, BlockNumber endblk, bool page_std);
|
||||
BlockNumber startblk, BlockNumber endblk, bool page_std);
|
||||
extern XLogRecPtr XLogSaveBufferForHint(Buffer buffer, bool buffer_std);
|
||||
|
||||
extern void InitXLogInsert(void);
|
||||
|
@@ -198,19 +198,19 @@ struct XLogReaderState
|
||||
|
||||
/* Get a new XLogReader */
|
||||
extern XLogReaderState *XLogReaderAllocate(int wal_segment_size,
|
||||
XLogPageReadCB pagereadfunc,
|
||||
void *private_data);
|
||||
XLogPageReadCB pagereadfunc,
|
||||
void *private_data);
|
||||
|
||||
/* Free an XLogReader */
|
||||
extern void XLogReaderFree(XLogReaderState *state);
|
||||
|
||||
/* Read the next XLog record. Returns NULL on end-of-WAL or failure */
|
||||
extern struct XLogRecord *XLogReadRecord(XLogReaderState *state,
|
||||
XLogRecPtr recptr, char **errormsg);
|
||||
XLogRecPtr recptr, char **errormsg);
|
||||
|
||||
/* Validate a page */
|
||||
extern bool XLogReaderValidatePageHeader(XLogReaderState *state,
|
||||
XLogRecPtr recptr, char *phdr);
|
||||
XLogRecPtr recptr, char *phdr);
|
||||
|
||||
/* Invalidate read state */
|
||||
extern void XLogReaderInvalReadState(XLogReaderState *state);
|
||||
@@ -222,7 +222,7 @@ extern XLogRecPtr XLogFindNextRecord(XLogReaderState *state, XLogRecPtr RecPtr);
|
||||
/* Functions for decoding an XLogRecord */
|
||||
|
||||
extern bool DecodeXLogRecord(XLogReaderState *state, XLogRecord *record,
|
||||
char **errmsg);
|
||||
char **errmsg);
|
||||
|
||||
#define XLogRecGetTotalLen(decoder) ((decoder)->decoded_record->xl_tot_len)
|
||||
#define XLogRecGetPrev(decoder) ((decoder)->decoded_record->xl_prev)
|
||||
@@ -243,7 +243,7 @@ extern bool DecodeXLogRecord(XLogReaderState *state, XLogRecord *record,
|
||||
extern bool RestoreBlockImage(XLogReaderState *recoder, uint8 block_id, char *dst);
|
||||
extern char *XLogRecGetBlockData(XLogReaderState *record, uint8 block_id, Size *len);
|
||||
extern bool XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id,
|
||||
RelFileNode *rnode, ForkNumber *forknum,
|
||||
BlockNumber *blknum);
|
||||
RelFileNode *rnode, ForkNumber *forknum,
|
||||
BlockNumber *blknum);
|
||||
|
||||
#endif /* XLOGREADER_H */
|
||||
|
@@ -21,7 +21,7 @@ extern void XLogCheckInvalidPages(void);
|
||||
extern void XLogDropRelation(RelFileNode rnode, ForkNumber forknum);
|
||||
extern void XLogDropDatabase(Oid dbid);
|
||||
extern void XLogTruncateRelation(RelFileNode rnode, ForkNumber forkNum,
|
||||
BlockNumber nblocks);
|
||||
BlockNumber nblocks);
|
||||
|
||||
/* Result codes for XLogReadBufferForRedo[Extended] */
|
||||
typedef enum
|
||||
@@ -34,25 +34,25 @@ typedef enum
|
||||
} XLogRedoAction;
|
||||
|
||||
extern XLogRedoAction XLogReadBufferForRedo(XLogReaderState *record,
|
||||
uint8 buffer_id, Buffer *buf);
|
||||
uint8 buffer_id, Buffer *buf);
|
||||
extern Buffer XLogInitBufferForRedo(XLogReaderState *record, uint8 block_id);
|
||||
extern XLogRedoAction XLogReadBufferForRedoExtended(XLogReaderState *record,
|
||||
uint8 buffer_id,
|
||||
ReadBufferMode mode, bool get_cleanup_lock,
|
||||
Buffer *buf);
|
||||
uint8 buffer_id,
|
||||
ReadBufferMode mode, bool get_cleanup_lock,
|
||||
Buffer *buf);
|
||||
|
||||
extern Buffer XLogReadBufferExtended(RelFileNode rnode, ForkNumber forknum,
|
||||
BlockNumber blkno, ReadBufferMode mode);
|
||||
BlockNumber blkno, ReadBufferMode mode);
|
||||
|
||||
extern Relation CreateFakeRelcacheEntry(RelFileNode rnode);
|
||||
extern void FreeFakeRelcacheEntry(Relation fakerel);
|
||||
|
||||
extern int read_local_xlog_page(XLogReaderState *state,
|
||||
XLogRecPtr targetPagePtr, int reqLen,
|
||||
XLogRecPtr targetRecPtr, char *cur_page,
|
||||
TimeLineID *pageTLI);
|
||||
extern int read_local_xlog_page(XLogReaderState *state,
|
||||
XLogRecPtr targetPagePtr, int reqLen,
|
||||
XLogRecPtr targetRecPtr, char *cur_page,
|
||||
TimeLineID *pageTLI);
|
||||
|
||||
extern void XLogReadDetermineTimeline(XLogReaderState *state,
|
||||
XLogRecPtr wantPage, uint32 wantLength);
|
||||
XLogRecPtr wantPage, uint32 wantLength);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user