hio.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*-------------------------------------------------------------------------
  2. *
  3. * hio.h
  4. * POSTGRES heap access method input/output definitions.
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2016, 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. #include "access/heapam.h"
  17. #include "access/htup.h"
  18. #include "utils/relcache.h"
  19. #include "storage/buf.h"
  20. /*
  21. * state for bulk inserts --- private to heapam.c and hio.c
  22. *
  23. * If current_buf isn't InvalidBuffer, then we are holding an extra pin
  24. * on that buffer.
  25. *
  26. * "typedef struct BulkInsertStateData *BulkInsertState" is in heapam.h
  27. */
  28. typedef struct BulkInsertStateData
  29. {
  30. BufferAccessStrategy strategy; /* our BULKWRITE strategy object */
  31. Buffer current_buf; /* current insertion target page */
  32. } BulkInsertStateData;
  33. extern void RelationPutHeapTuple(Relation relation, Buffer buffer,
  34. HeapTuple tuple, bool token);
  35. extern Buffer RelationGetBufferForTuple(Relation relation, Size len,
  36. Buffer otherBuffer, int options,
  37. BulkInsertState bistate,
  38. Buffer *vmbuffer, Buffer *vmbuffer_other);
  39. #endif /* HIO_H */