36 pg_fatal(
"Cannot upgrade to/from the same system catalog version when\n"
37 "using tablespaces.");
59 "SELECT pg_catalog.pg_tablespace_location(oid) AS spclocation "
60 "FROM pg_catalog.pg_tablespace "
61 "WHERE spcname != 'pg_default' AND "
62 " spcname != 'pg_global'");
82 i_spclocation =
PQfnumber(res,
"spclocation");
87 char *spcloc =
PQgetvalue(res, tblnum, i_spclocation);
122 "tablespace directory \"%s\" does not exist",
126 "could not stat tablespace directory \"%s\": %m",
131 "tablespace path \"%s\" is not a directory",
static void set_tablespace_directory_suffix(ClusterInfo *cluster)
void init_tablespaces(void)
static void get_tablespace_paths(void)
void cluster(ParseState *pstate, ClusterStmt *stmt, bool isTopLevel)
void PQfinish(PGconn *conn)
int PQfnumber(const PGresult *res, const char *field_name)
void * pg_malloc(size_t size)
char * pg_strdup(const char *in)
PGconn * connectToServer(ClusterInfo *cluster, const char *db_name)
PGresult * executeQueryOrDie(PGconn *conn, const char *fmt,...) pg_attribute_printf(2
void report_status(eLogType type, const char *fmt,...) pg_attribute_printf(2
#define is_absolute_path(filename)
char * psprintf(const char *fmt,...)
const char * tablespace_suffix