hio.h 1.3 KB

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