1 /*-------------------------------------------------------------------------
4 * POSTGRES heap access method input/output definitions.
7 * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/access/hio.h
12 *-------------------------------------------------------------------------
17 #include "access/heapam.h"
18 #include "access/htup.h"
19 #include "utils/relcache.h"
20 #include "storage/buf.h"
24 * state for bulk inserts --- private to heapam.c and hio.c
26 * If current_buf isn't InvalidBuffer, then we are holding an extra pin
29 * "typedef struct BulkInsertStateData *BulkInsertState" is in heapam.h
31 typedef struct BulkInsertStateData
33 BufferAccessStrategy strategy; /* our BULKWRITE strategy object */
34 Buffer current_buf; /* current insertion target page */
35 } BulkInsertStateData;
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);