PostgreSQL Source Code  git master
brin_pageops.h
Go to the documentation of this file.
1 /*
2  * brin_pageops.h
3  * Prototypes for operating on BRIN pages.
4  *
5  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
6  * Portions Copyright (c) 1994, Regents of the University of California
7  *
8  * IDENTIFICATION
9  * src/include/access/brin_pageops.h
10  */
11 #ifndef BRIN_PAGEOPS_H
12 #define BRIN_PAGEOPS_H
13 
14 #include "access/brin_revmap.h"
15 
16 extern bool brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
17  BrinRevmap *revmap, BlockNumber heapBlk,
18  Buffer oldbuf, OffsetNumber oldoff,
19  const BrinTuple *origtup, Size origsz,
20  const BrinTuple *newtup, Size newsz,
21  bool samepage);
22 extern bool brin_can_do_samepage_update(Buffer buffer, Size origsz,
23  Size newsz);
24 extern OffsetNumber brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
25  BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk,
26  BrinTuple *tup, Size itemsz);
27 
28 extern void brin_page_init(Page page, uint16 type);
29 extern void brin_metapage_init(Page page, BlockNumber pagesPerRange,
30  uint16 version);
31 
32 extern bool brin_start_evacuating_page(Relation idxRel, Buffer buf);
33 extern void brin_evacuate_page(Relation idxRel, BlockNumber pagesPerRange,
34  BrinRevmap *revmap, Buffer buf);
35 
36 extern bool brin_page_cleanup(Relation idxrel, Buffer buf);
37 
38 #endif /* BRIN_PAGEOPS_H */
void brin_page_init(Page page, uint16 type)
Definition: brin_pageops.c:471
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)
Definition: brin_pageops.c:55
uint32 BlockNumber
Definition: block.h:31
bool brin_can_do_samepage_update(Buffer buffer, Size origsz, Size newsz)
Definition: brin_pageops.c:327
uint16 OffsetNumber
Definition: off.h:24
unsigned short uint16
Definition: c.h:295
static char * buf
Definition: pg_test_fsync.c:67
OffsetNumber brin_doinsert(Relation idxrel, BlockNumber pagesPerRange, BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk, BrinTuple *tup, Size itemsz)
Definition: brin_pageops.c:346
bool brin_page_cleanup(Relation idxrel, Buffer buf)
Definition: brin_pageops.c:609
WalTimeSample buffer[LAG_TRACKER_BUFFER_SIZE]
Definition: walsender.c:214
size_t Size
Definition: c.h:404
bool brin_start_evacuating_page(Relation idxRel, Buffer buf)
Definition: brin_pageops.c:520
void brin_evacuate_page(Relation idxRel, BlockNumber pagesPerRange, BrinRevmap *revmap, Buffer buf)
Definition: brin_pageops.c:555
int Buffer
Definition: buf.h:23
Pointer Page
Definition: bufpage.h:74
void brin_metapage_init(Page page, BlockNumber pagesPerRange, uint16 version)
Definition: brin_pageops.c:482