1 /*-------------------------------------------------------------------------
4 * Tablespace management commands (create/drop tablespace).
7 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
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
, Oid newOwnerId
);
41 extern void TablespaceCreateDbspace(Oid spcNode
, Oid dbNode
, bool isRedo
);
43 extern Oid
GetDefaultTablespace(bool forTemp
);
45 extern void PrepareTempTablespaces(void);
47 extern Oid
get_tablespace_oid(const char *tablespacename
);
48 extern char *get_tablespace_name(Oid spc_oid
);
50 extern bool directory_is_empty(const char *path
);
52 extern void tblspc_redo(XLogRecPtr lsn
, XLogRecord
*rptr
);
53 extern void tblspc_desc(StringInfo buf
, uint8 xl_info
, char *rec
);
55 #endif /* TABLESPACE_H */