00001 /*------------------------------------------------------------------------- 00002 * 00003 * hio.h 00004 * POSTGRES heap access method input/output definitions. 00005 * 00006 * 00007 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group 00008 * Portions Copyright (c) 1994, Regents of the University of California 00009 * 00010 * src/include/access/hio.h 00011 * 00012 *------------------------------------------------------------------------- 00013 */ 00014 #ifndef HIO_H 00015 #define HIO_H 00016 00017 #include "access/heapam.h" 00018 #include "access/htup.h" 00019 #include "utils/relcache.h" 00020 #include "storage/buf.h" 00021 00022 00023 /* 00024 * state for bulk inserts --- private to heapam.c and hio.c 00025 * 00026 * If current_buf isn't InvalidBuffer, then we are holding an extra pin 00027 * on that buffer. 00028 * 00029 * "typedef struct BulkInsertStateData *BulkInsertState" is in heapam.h 00030 */ 00031 typedef struct BulkInsertStateData 00032 { 00033 BufferAccessStrategy strategy; /* our BULKWRITE strategy object */ 00034 Buffer current_buf; /* current insertion target page */ 00035 } BulkInsertStateData; 00036 00037 00038 extern void RelationPutHeapTuple(Relation relation, Buffer buffer, 00039 HeapTuple tuple); 00040 extern Buffer RelationGetBufferForTuple(Relation relation, Size len, 00041 Buffer otherBuffer, int options, 00042 BulkInsertState bistate, 00043 Buffer *vmbuffer, Buffer *vmbuffer_other); 00044 00045 #endif /* HIO_H */