PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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-2017, 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/heapam.h"
18 #include "access/htup.h"
19 #include "utils/relcache.h"
20 #include "storage/buf.h"
21 
22 
23 /*
24  * state for bulk inserts --- private to heapam.c and hio.c
25  *
26  * If current_buf isn't InvalidBuffer, then we are holding an extra pin
27  * on that buffer.
28  *
29  * "typedef struct BulkInsertStateData *BulkInsertState" is in heapam.h
30  */
31 typedef struct BulkInsertStateData
32 {
33  BufferAccessStrategy strategy; /* our BULKWRITE strategy object */
34  Buffer current_buf; /* current insertion target page */
36 
37 
38 extern void RelationPutHeapTuple(Relation relation, Buffer buffer,
39  HeapTuple tuple, bool token);
40 extern Buffer RelationGetBufferForTuple(Relation relation, Size len,
41  Buffer otherBuffer, int options,
42  BulkInsertState bistate,
43  Buffer *vmbuffer, Buffer *vmbuffer_other);
44 
45 #endif /* HIO_H */
struct BulkInsertStateData BulkInsertStateData
void RelationPutHeapTuple(Relation relation, Buffer buffer, HeapTuple tuple, bool token)
Definition: hio.c:36
Buffer RelationGetBufferForTuple(Relation relation, Size len, Buffer otherBuffer, int options, BulkInsertState bistate, Buffer *vmbuffer, Buffer *vmbuffer_other)
Definition: hio.c:297
size_t Size
Definition: c.h:356
BufferAccessStrategy strategy
Definition: hio.h:33
int Buffer
Definition: buf.h:23
Buffer current_buf
Definition: hio.h:34