Don't repeatedly register cache callbacks in pgoutput plugin.
[pgsql.git] / src / include / commands / tablespace.h
blob7cb057441d39bda3d61be8f4c55107fdb9856df4
1 /*-------------------------------------------------------------------------
3 * tablespace.h
4 * Tablespace management commands (create/drop tablespace).
7 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/commands/tablespace.h
12 *-------------------------------------------------------------------------
14 #ifndef TABLESPACE_H
15 #define TABLESPACE_H
17 #include "access/xlogreader.h"
18 #include "catalog/objectaddress.h"
19 #include "lib/stringinfo.h"
20 #include "nodes/parsenodes.h"
22 extern bool allow_in_place_tablespaces;
24 /* XLOG stuff */
25 #define XLOG_TBLSPC_CREATE 0x00
26 #define XLOG_TBLSPC_DROP 0x10
28 typedef struct xl_tblspc_create_rec
30 Oid ts_id;
31 char ts_path[FLEXIBLE_ARRAY_MEMBER]; /* null-terminated string */
32 } xl_tblspc_create_rec;
34 typedef struct xl_tblspc_drop_rec
36 Oid ts_id;
37 } xl_tblspc_drop_rec;
39 typedef struct TableSpaceOpts
41 int32 vl_len_; /* varlena header (do not touch directly!) */
42 float8 random_page_cost;
43 float8 seq_page_cost;
44 int effective_io_concurrency;
45 } TableSpaceOpts;
47 extern Oid CreateTableSpace(CreateTableSpaceStmt *stmt);
48 extern void DropTableSpace(DropTableSpaceStmt *stmt);
49 extern ObjectAddress RenameTableSpace(const char *oldname, const char *newname);
50 extern Oid AlterTableSpaceOptions(AlterTableSpaceOptionsStmt *stmt);
52 extern void TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo);
54 extern Oid GetDefaultTablespace(char relpersistence, bool partitioned);
56 extern void PrepareTempTablespaces(void);
58 extern Oid get_tablespace_oid(const char *tablespacename, bool missing_ok);
59 extern char *get_tablespace_name(Oid spc_oid);
61 extern bool directory_is_empty(const char *path);
62 extern void remove_tablespace_symlink(const char *linkloc);
64 extern void tblspc_redo(XLogReaderState *rptr);
65 extern void tblspc_desc(StringInfo buf, XLogReaderState *rptr);
66 extern const char *tblspc_identify(uint8 info);
68 #endif /* TABLESPACE_H */