PostgreSQL Source Code  git master
storage.h
Go to the documentation of this file.
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 
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 */
void AtSubCommit_smgr(void)
Definition: storage.c:575
void PostPrepare_smgr(void)
Definition: storage.c:554
uint32 BlockNumber
Definition: block.h:31
int smgrGetPendingDeletes(bool forCommit, RelFileNode **ptr)
Definition: storage.c:513
char relpersistence
Definition: pg_class.h:78
void smgrDoPendingDeletes(bool isCommit)
Definition: storage.c:430
void AtSubAbort_smgr(void)
Definition: storage.c:595
void RelationCopyStorage(SMgrRelation src, SMgrRelation dst, ForkNumber forkNum, char relpersistence)
Definition: storage.c:336
ForkNumber
Definition: relpath.h:40
SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence)
Definition: storage.c:78
void RelationPreserveStorage(RelFileNode rnode, bool atCommit)
Definition: storage.c:192
void RelationDropStorage(Relation rel)
Definition: storage.c:147
void RelationTruncate(Relation rel, BlockNumber nblocks)
Definition: storage.c:229