Fix further fallout from EXPLAIN ANALYZE BUFFERS change
[pgsql.git] / src / include / storage / bulk_write.h
blobcf6f6fcb3f2868686149c8ba2b88c3f75d758fde
1 /*-------------------------------------------------------------------------
3 * bulk_write.h
4 * Efficiently and reliably populate a new relation
7 * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/storage/bulk_write.h
12 *-------------------------------------------------------------------------
14 #ifndef BULK_WRITE_H
15 #define BULK_WRITE_H
17 #include "storage/smgr.h"
18 #include "utils/rel.h"
20 /* Bulk writer state, contents are private to bulk_write.c */
21 typedef struct BulkWriteState BulkWriteState;
24 * Temporary buffer to hold a page to until it's written out. Use
25 * smgr_bulk_get_buf() to reserve one of these. This is a separate typedef to
26 * distinguish it from other block-sized buffers passed around in the system.
28 typedef PGIOAlignedBlock *BulkWriteBuffer;
30 /* forward declared from smgr.h */
31 struct SMgrRelationData;
33 extern BulkWriteState *smgr_bulk_start_rel(Relation rel, ForkNumber forknum);
34 extern BulkWriteState *smgr_bulk_start_smgr(struct SMgrRelationData *smgr, ForkNumber forknum, bool use_wal);
36 extern BulkWriteBuffer smgr_bulk_get_buf(BulkWriteState *bulkstate);
37 extern void smgr_bulk_write(BulkWriteState *bulkstate, BlockNumber blocknum, BulkWriteBuffer buf, bool page_std);
39 extern void smgr_bulk_finish(BulkWriteState *bulkstate);
41 #endif /* BULK_WRITE_H */