PostgreSQL Source Code  git master
hio.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * hio.h
4  * POSTGRES heap access method input/output definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/access/hio.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef HIO_H
15 #define HIO_H
16 
17 #include "access/htup.h"
18 #include "utils/relcache.h"
19 #include "storage/buf.h"
20 
21 
22 /*
23  * state for bulk inserts --- private to heapam.c and hio.c
24  *
25  * If current_buf isn't InvalidBuffer, then we are holding an extra pin
26  * on that buffer.
27  *
28  * "typedef struct BulkInsertStateData *BulkInsertState" is in heapam.h
29  */
30 typedef struct BulkInsertStateData
31 {
32  BufferAccessStrategy strategy; /* our BULKWRITE strategy object */
33  Buffer current_buf; /* current insertion target page */
35 
36 
37 extern void RelationPutHeapTuple(Relation relation, Buffer buffer,
38  HeapTuple tuple, bool token);
39 extern Buffer RelationGetBufferForTuple(Relation relation, Size len,
40  Buffer otherBuffer, int options,
41  BulkInsertStateData *bistate,
42  Buffer *vmbuffer, Buffer *vmbuffer_other);
43 
44 #endif /* HIO_H */
struct BulkInsertStateData BulkInsertStateData
Buffer RelationGetBufferForTuple(Relation relation, Size len, Buffer otherBuffer, int options, BulkInsertStateData *bistate, Buffer *vmbuffer, Buffer *vmbuffer_other)
void RelationPutHeapTuple(Relation relation, Buffer buffer, HeapTuple tuple, bool token)
Definition: hio.c:36
size_t Size
Definition: c.h:467
BufferAccessStrategy strategy
Definition: hio.h:32
int Buffer
Definition: buf.h:23
Buffer current_buf
Definition: hio.h:33