3 * Prototypes for BRIN reverse range maps
5 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
6 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/access/brin_revmap.h
15 #include "access/brin_tuple.h"
16 #include "storage/block.h"
17 #include "storage/buf.h"
18 #include "storage/itemptr.h"
19 #include "storage/off.h"
20 #include "utils/relcache.h"
21 #include "utils/snapshot.h"
23 /* struct definition lives in brin_revmap.c */
24 typedef struct BrinRevmap BrinRevmap
;
26 extern BrinRevmap
*brinRevmapInitialize(Relation idxrel
,
27 BlockNumber
*pagesPerRange
, Snapshot snapshot
);
28 extern void brinRevmapTerminate(BrinRevmap
*revmap
);
30 extern void brinRevmapExtend(BrinRevmap
*revmap
,
32 extern Buffer
brinLockRevmapPageForUpdate(BrinRevmap
*revmap
,
34 extern void brinSetHeapBlockItemptr(Buffer buf
, BlockNumber pagesPerRange
,
35 BlockNumber heapBlk
, ItemPointerData tid
);
36 extern BrinTuple
*brinGetTupleForHeapBlock(BrinRevmap
*revmap
,
37 BlockNumber heapBlk
, Buffer
*buf
, OffsetNumber
*off
,
38 Size
*size
, int mode
, Snapshot snapshot
);
39 extern bool brinRevmapDesummarizeRange(Relation idxrel
, BlockNumber heapBlk
);
41 #endif /* BRIN_REVMAP_H */