if (os_info.num_old_tablespaces > 0 &&
strcmp(old_cluster.tablespace_suffix, new_cluster.tablespace_suffix) == 0)
pg_fatal("Cannot upgrade to/from the same system catalog version when\n" "using tablespaces.");
}
/* *Checkthatthetablespacepathexistsandisadirectory. *Effectively,thisischeckingonlyfortables/indexesin *non-existenttablespacedirectories.Databaseslocatedin *non-existenttablespacesalreadythrowabackenderror. *Non-existenttablespacedirectoriescanoccurwhenadatadirectory *thatcontainsusertablespacesismovedaspartofpg_upgrade *preparationandthesymboliclinksarenotupdated.
*/ if (stat(os_info.old_tablespaces[tblnum], &statBuf) != 0)
{ if (errno == ENOENT)
report_status(PG_FATAL, "tablespace directory \"%s\" does not exist",
os_info.old_tablespaces[tblnum]); else
report_status(PG_FATAL, "could not stat tablespace directory \"%s\": %m",
os_info.old_tablespaces[tblnum]);
} if (!S_ISDIR(statBuf.st_mode))
report_status(PG_FATAL, "tablespace path \"%s\" is not a directory",
os_info.old_tablespaces[tblnum]);
}
PQclear(res);
PQfinish(conn);
}
staticvoid
set_tablespace_directory_suffix(ClusterInfo *cluster)
{ /* This cluster has a version-specific subdirectory */
/* The leading slash is needed to start a new directory. */
cluster->tablespace_suffix = psprintf("/PG_%s_%d",
cluster->major_version_str,
cluster->controldata.cat_ver);
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.