diff options
Diffstat (limited to 'src/backend/commands/tablespace.c')
-rw-r--r-- | src/backend/commands/tablespace.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index 15a263b8efd..b925825062f 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.23 2005/06/28 05:08:54 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.24 2005/07/04 04:51:46 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -338,8 +338,8 @@ CreateTableSpace(CreateTableSpaceStmt *stmt) /* * All seems well, create the symlink */ - linkloc = (char *) palloc(strlen(DataDir) + 11 + 10 + 1); - sprintf(linkloc, "%s/pg_tblspc/%u", DataDir, tablespaceoid); + linkloc = (char *) palloc(10 + 10 + 1); + sprintf(linkloc, "pg_tblspc/%u", tablespaceoid); if (symlink(location, linkloc) < 0) ereport(ERROR, @@ -491,8 +491,8 @@ remove_tablespace_directories(Oid tablespaceoid, bool redo) char *subfile; struct stat st; - location = (char *) palloc(strlen(DataDir) + 11 + 10 + 1); - sprintf(location, "%s/pg_tblspc/%u", DataDir, tablespaceoid); + location = (char *) palloc(10 + 10 + 1); + sprintf(location, "pg_tblspc/%u", tablespaceoid); /* * Check if the tablespace still contains any files. We try to rmdir @@ -989,8 +989,8 @@ tblspc_redo(XLogRecPtr lsn, XLogRecord *record) set_short_version(location); /* Create the symlink if not already present */ - linkloc = (char *) palloc(strlen(DataDir) + 11 + 10 + 1); - sprintf(linkloc, "%s/pg_tblspc/%u", DataDir, xlrec->ts_id); + linkloc = (char *) palloc(10 + 10 + 1); + sprintf(linkloc, "pg_tblspc/%u", xlrec->ts_id); if (symlink(location, linkloc) < 0) { |