1
/*-------------------------------------------------------------------------
4
* Tablespace management commands (create/drop tablespace).
7
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
8
* Portions Copyright (c) 1994, Regents of the University of California
10
* $PostgreSQL: pgsql/src/include/commands/tablespace.h,v 1.8 2004-12-31 22:03:28 pgsql Exp $
12
*-------------------------------------------------------------------------
17
#include "access/xlog.h"
18
#include "nodes/parsenodes.h"
21
#define XLOG_TBLSPC_CREATE 0x00
22
#define XLOG_TBLSPC_DROP 0x10
24
typedef struct xl_tblspc_create_rec
27
char ts_path[1]; /* VARIABLE LENGTH STRING */
28
} xl_tblspc_create_rec;
30
typedef struct xl_tblspc_drop_rec
36
extern void CreateTableSpace(CreateTableSpaceStmt *stmt);
37
extern void DropTableSpace(DropTableSpaceStmt *stmt);
38
extern void RenameTableSpace(const char *oldname, const char *newname);
39
extern void AlterTableSpaceOwner(const char *name, AclId newOwnerSysId);
41
extern void TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo);
43
extern Oid GetDefaultTablespace(void);
45
extern Oid get_tablespace_oid(const char *tablespacename);
46
extern char *get_tablespace_name(Oid spc_oid);
48
extern bool directory_is_empty(const char *path);
50
extern void tblspc_redo(XLogRecPtr lsn, XLogRecord *rptr);
51
extern void tblspc_undo(XLogRecPtr lsn, XLogRecord *rptr);
52
extern void tblspc_desc(char *buf, uint8 xl_info, char *rec);
54
#endif /* TABLESPACE_H */