*** pgsql/src/include/access/hio.h 2008/06/19 00:46:06 1.36 --- pgsql/src/include/access/hio.h 2008/11/06 20:51:15 1.37 *************** *** 7,13 **** * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/include/access/hio.h,v 1.35 2008/01/01 19:45:56 momjian Exp $ * *------------------------------------------------------------------------- */ --- 7,13 ---- * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/include/access/hio.h,v 1.36 2008/06/19 00:46:06 alvherre Exp $ * *------------------------------------------------------------------------- */ *************** *** 18,26 **** #include "utils/relcache.h" #include "storage/buf.h" extern void RelationPutHeapTuple(Relation relation, Buffer buffer, HeapTuple tuple); extern Buffer RelationGetBufferForTuple(Relation relation, Size len, ! Buffer otherBuffer, bool use_fsm); #endif /* HIO_H */ --- 18,43 ---- #include "utils/relcache.h" #include "storage/buf.h" + + /* + * state for bulk inserts --- private to heapam.c and hio.c + * + * If current_buf isn't InvalidBuffer, then we are holding an extra pin + * on that buffer. + * + * "typedef struct BulkInsertStateData *BulkInsertState" is in heapam.h + */ + typedef struct BulkInsertStateData + { + BufferAccessStrategy strategy; /* our BULKWRITE strategy object */ + Buffer current_buf; /* current insertion target page */ + } BulkInsertStateData; + + extern void RelationPutHeapTuple(Relation relation, Buffer buffer, HeapTuple tuple); extern Buffer RelationGetBufferForTuple(Relation relation, Size len, ! Buffer otherBuffer, int options, ! struct BulkInsertStateData *bistate); #endif /* HIO_H */