Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
tablespace.h70 linesDownload Raw Back to commands
1/*-------------------------------------------------------------------------2 *3 * tablespace.h4 *		Tablespace management commands (create/drop tablespace).5 *6 *7 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group8 * Portions Copyright (c) 1994, Regents of the University of California9 *10 * src/include/commands/tablespace.h11 *12 *-------------------------------------------------------------------------13 */14#ifndef TABLESPACE_H15#define TABLESPACE_H16 17#include "access/xlogreader.h"18#include "catalog/objectaddress.h"19#include "lib/stringinfo.h"20#include "nodes/parsenodes.h"21 22extern PGDLLIMPORT bool allow_in_place_tablespaces;23 24/* XLOG stuff */25#define XLOG_TBLSPC_CREATE		0x0026#define XLOG_TBLSPC_DROP		0x1027 28typedef struct xl_tblspc_create_rec29{30	Oid			ts_id;31	char		ts_path[FLEXIBLE_ARRAY_MEMBER]; /* null-terminated string */32} xl_tblspc_create_rec;33 34typedef struct xl_tblspc_drop_rec35{36	Oid			ts_id;37} xl_tblspc_drop_rec;38 39typedef struct TableSpaceOpts40{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	int			maintenance_io_concurrency;46} TableSpaceOpts;47 48extern Oid	CreateTableSpace(CreateTableSpaceStmt *stmt);49extern void DropTableSpace(DropTableSpaceStmt *stmt);50extern ObjectAddress RenameTableSpace(const char *oldname, const char *newname);51extern Oid	AlterTableSpaceOptions(AlterTableSpaceOptionsStmt *stmt);52 53extern void TablespaceCreateDbspace(Oid spcOid, Oid dbOid, bool isRedo);54 55extern Oid	GetDefaultTablespace(char relpersistence, bool partitioned);56 57extern void PrepareTempTablespaces(void);58 59extern Oid	get_tablespace_oid(const char *tablespacename, bool missing_ok);60extern char *get_tablespace_name(Oid spc_oid);61 62extern bool directory_is_empty(const char *path);63extern void remove_tablespace_symlink(const char *linkloc);64 65extern void tblspc_redo(XLogReaderState *record);66extern void tblspc_desc(StringInfo buf, XLogReaderState *record);67extern const char *tblspc_identify(uint8 info);68 69#endif							/* TABLESPACE_H */70 
codekingpro/portable-devtools · Team Ai