diff options
author | Bruce Momjian | 2005-05-10 22:27:30 +0000 |
---|---|---|
committer | Bruce Momjian | 2005-05-10 22:27:30 +0000 |
commit | 35e16515080868e87849a6846ab1c36977157154 (patch) | |
tree | e6666df41d9dd86b5978c4b4072967c55347abe2 /src/backend/commands/tablespace.c | |
parent | 075ec42cf889598effc8f8a0f5c661f2e7408b61 (diff) |
Back out check for unreferenced files.
Heikki Linnakangas
Diffstat (limited to 'src/backend/commands/tablespace.c')
-rw-r--r-- | src/backend/commands/tablespace.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index be0cc555940..bf62aec5282 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -37,7 +37,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.18 2005/05/02 18:26:53 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.19 2005/05/10 22:27:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -341,7 +341,8 @@ CreateTableSpace(CreateTableSpaceStmt *stmt) /* * All seems well, create the symlink */ - linkloc = GetTablespacePath(tablespaceoid); + linkloc = (char *) palloc(strlen(DataDir) + 11 + 10 + 1); + sprintf(linkloc, "%s/pg_tblspc/%u", DataDir, tablespaceoid); if (symlink(location, linkloc) < 0) ereport(ERROR, @@ -494,7 +495,8 @@ remove_tablespace_directories(Oid tablespaceoid, bool redo) char *subfile; struct stat st; - location = GetTablespacePath(tablespaceoid); + location = (char *) palloc(strlen(DataDir) + 11 + 10 + 1); + sprintf(location, "%s/pg_tblspc/%u", DataDir, tablespaceoid); /* * Check if the tablespace still contains any files. We try to rmdir @@ -1034,7 +1036,8 @@ tblspc_redo(XLogRecPtr lsn, XLogRecord *record) set_short_version(location); /* Create the symlink if not already present */ - linkloc = GetTablespacePath(xlrec->ts_id); + linkloc = (char *) palloc(strlen(DataDir) + 11 + 10 + 1); + sprintf(linkloc, "%s/pg_tblspc/%u", DataDir, xlrec->ts_id); if (symlink(location, linkloc) < 0) { |