1996-08-27 23:50:29 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* hio.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* POSTGRES heap access method input/output definitions.
|
1996-08-27 23:50:29 +02:00
|
|
|
*
|
|
|
|
*
|
2015-01-06 17:43:47 +01:00
|
|
|
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-27 23:50:29 +02:00
|
|
|
*
|
2010-09-20 22:08:53 +02:00
|
|
|
* src/include/access/hio.h
|
1996-08-27 23:50:29 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef HIO_H
|
1996-08-27 23:50:29 +02:00
|
|
|
#define HIO_H
|
|
|
|
|
2012-06-10 11:43:00 +02:00
|
|
|
#include "access/heapam.h"
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "access/htup.h"
|
2008-06-19 02:46:06 +02:00
|
|
|
#include "utils/relcache.h"
|
2006-07-13 19:47:02 +02:00
|
|
|
#include "storage/buf.h"
|
1996-08-27 23:50:29 +02:00
|
|
|
|
2008-11-06 21:51:15 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
{
|
2009-06-11 16:49:15 +02:00
|
|
|
BufferAccessStrategy strategy; /* our BULKWRITE strategy object */
|
|
|
|
Buffer current_buf; /* current insertion target page */
|
2011-04-10 17:42:00 +02:00
|
|
|
} BulkInsertStateData;
|
2008-11-06 21:51:15 +01:00
|
|
|
|
|
|
|
|
1999-05-25 18:15:34 +02:00
|
|
|
extern void RelationPutHeapTuple(Relation relation, Buffer buffer,
|
|
|
|
HeapTuple tuple);
|
2001-05-17 00:35:12 +02:00
|
|
|
extern Buffer RelationGetBufferForTuple(Relation relation, Size len,
|
2008-11-06 21:51:15 +01:00
|
|
|
Buffer otherBuffer, int options,
|
2011-10-12 22:53:54 +02:00
|
|
|
BulkInsertState bistate,
|
2011-06-27 19:55:55 +02:00
|
|
|
Buffer *vmbuffer, Buffer *vmbuffer_other);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* HIO_H */
|