1 | /*------------------------------------------------------------------------- |
2 | * |
3 | * storage.h |
4 | * prototypes for functions in backend/catalog/storage.c |
5 | * |
6 | * |
7 | * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group |
8 | * Portions Copyright (c) 1994, Regents of the University of California |
9 | * |
10 | * src/include/catalog/storage.h |
11 | * |
12 | *------------------------------------------------------------------------- |
13 | */ |
14 | #ifndef STORAGE_H |
15 | #define STORAGE_H |
16 | |
17 | #include "storage/block.h" |
18 | #include "storage/relfilenode.h" |
19 | #include "storage/smgr.h" |
20 | #include "utils/relcache.h" |
21 | |
22 | extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence); |
23 | extern void RelationDropStorage(Relation rel); |
24 | extern void RelationPreserveStorage(RelFileNode rnode, bool atCommit); |
25 | extern void RelationTruncate(Relation rel, BlockNumber nblocks); |
26 | extern void RelationCopyStorage(SMgrRelation src, SMgrRelation dst, |
27 | ForkNumber forkNum, char relpersistence); |
28 | |
29 | /* |
30 | * These functions used to be in storage/smgr/smgr.c, which explains the |
31 | * naming |
32 | */ |
33 | extern void smgrDoPendingDeletes(bool isCommit); |
34 | extern int smgrGetPendingDeletes(bool forCommit, RelFileNode **ptr); |
35 | extern void AtSubCommit_smgr(void); |
36 | extern void AtSubAbort_smgr(void); |
37 | extern void PostPrepare_smgr(void); |
38 | |
39 | #endif /* STORAGE_H */ |
40 | |