2004-06-18 08:14:31 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* tablespace.h
|
2004-08-29 23:08:48 +02:00
|
|
|
* Tablespace management commands (create/drop tablespace).
|
2004-06-18 08:14:31 +02:00
|
|
|
*
|
|
|
|
*
|
2004-12-31 23:04:05 +01:00
|
|
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
2004-06-18 08:14:31 +02:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
2005-06-06 19:01:25 +02:00
|
|
|
* $PostgreSQL: pgsql/src/include/commands/tablespace.h,v 1.9 2005/06/06 17:01:25 tgl Exp $
|
2004-06-18 08:14:31 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef TABLESPACE_H
|
|
|
|
#define TABLESPACE_H
|
|
|
|
|
2004-08-29 23:08:48 +02:00
|
|
|
#include "access/xlog.h"
|
2004-06-18 08:14:31 +02:00
|
|
|
#include "nodes/parsenodes.h"
|
|
|
|
|
2004-08-29 23:08:48 +02:00
|
|
|
/* XLOG stuff */
|
|
|
|
#define XLOG_TBLSPC_CREATE 0x00
|
|
|
|
#define XLOG_TBLSPC_DROP 0x10
|
|
|
|
|
|
|
|
typedef struct xl_tblspc_create_rec
|
|
|
|
{
|
|
|
|
Oid ts_id;
|
|
|
|
char ts_path[1]; /* VARIABLE LENGTH STRING */
|
2004-08-30 04:54:42 +02:00
|
|
|
} xl_tblspc_create_rec;
|
2004-08-29 23:08:48 +02:00
|
|
|
|
|
|
|
typedef struct xl_tblspc_drop_rec
|
|
|
|
{
|
|
|
|
Oid ts_id;
|
2004-08-30 04:54:42 +02:00
|
|
|
} xl_tblspc_drop_rec;
|
2004-06-18 08:14:31 +02:00
|
|
|
|
2004-11-05 20:17:13 +01:00
|
|
|
|
2004-08-29 23:08:48 +02:00
|
|
|
extern void CreateTableSpace(CreateTableSpaceStmt *stmt);
|
2004-06-18 08:14:31 +02:00
|
|
|
extern void DropTableSpace(DropTableSpaceStmt *stmt);
|
2004-08-29 23:08:48 +02:00
|
|
|
extern void RenameTableSpace(const char *oldname, const char *newname);
|
|
|
|
extern void AlterTableSpaceOwner(const char *name, AclId newOwnerSysId);
|
2004-06-18 08:14:31 +02:00
|
|
|
|
2004-07-11 21:52:52 +02:00
|
|
|
extern void TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo);
|
2004-06-18 08:14:31 +02:00
|
|
|
|
2004-11-05 20:17:13 +01:00
|
|
|
extern Oid GetDefaultTablespace(void);
|
|
|
|
|
2004-06-18 08:14:31 +02:00
|
|
|
extern Oid get_tablespace_oid(const char *tablespacename);
|
|
|
|
extern char *get_tablespace_name(Oid spc_oid);
|
|
|
|
|
2004-10-17 22:47:21 +02:00
|
|
|
extern bool directory_is_empty(const char *path);
|
|
|
|
|
2004-08-29 23:08:48 +02:00
|
|
|
extern void tblspc_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
|
|
|
extern void tblspc_desc(char *buf, uint8 xl_info, char *rec);
|
2004-06-25 23:55:59 +02:00
|
|
|
|
2004-06-18 08:14:31 +02:00
|
|
|
#endif /* TABLESPACE_H */
|