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
22extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence);
23extern void RelationDropStorage(Relation rel);
24extern void RelationPreserveStorage(RelFileNode rnode, bool atCommit);
25extern void RelationTruncate(Relation rel, BlockNumber nblocks);
26extern 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 */
33extern void smgrDoPendingDeletes(bool isCommit);
34extern int smgrGetPendingDeletes(bool forCommit, RelFileNode **ptr);
35extern void AtSubCommit_smgr(void);
36extern void AtSubAbort_smgr(void);
37extern void PostPrepare_smgr(void);
38
39#endif /* STORAGE_H */
40