summaryrefslogtreecommitdiff
path: root/src/backend/storage
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2010-01-12 02:42:52 +0000
committerBruce Momjian <bruce@momjian.us>2010-01-12 02:42:52 +0000
commit228170410dd407f266e777dd49916aff0b1b5936 (patch)
treef29f53537d487ca646538ab2c7e4d8f0bfe6ea71 /src/backend/storage
parent894fc6b763c2053c01a5be5d20a76d1db650547d (diff)
downloadpostgresql-228170410dd407f266e777dd49916aff0b1b5936.tar.gz
Please tablespace directories in their own subdirectory so pg_migrator
can upgrade clusters without renaming the tablespace directories. New directory structure format is, e.g.: $PGDATA/pg_tblspc/20981/PG_8.5_201001061/719849/83292814
Diffstat (limited to 'src/backend/storage')
-rw-r--r--src/backend/storage/file/fd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 9d6786f4a4..ec27859e60 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.152 2010/01/02 16:57:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.153 2010/01/12 02:42:52 momjian Exp $
*
* NOTES:
*
@@ -51,6 +51,7 @@
#include "miscadmin.h"
#include "access/xact.h"
+#include "catalog/catalog.h"
#include "catalog/pg_tablespace.h"
#include "storage/fd.h"
#include "storage/ipc.h"
@@ -963,8 +964,8 @@ OpenTemporaryFileInTablespace(Oid tblspcOid, bool rejectError)
else
{
/* All other tablespaces are accessed via symlinks */
- snprintf(tempdirpath, sizeof(tempdirpath), "pg_tblspc/%u/%s",
- tblspcOid, PG_TEMP_FILES_DIR);
+ snprintf(tempdirpath, sizeof(tempdirpath), "pg_tblspc/%u/%s/%s",
+ tblspcOid, TABLESPACE_VERSION_DIRECTORY, PG_TEMP_FILES_DIR);
}
/*
@@ -1841,8 +1842,8 @@ RemovePgTempFiles(void)
strcmp(spc_de->d_name, "..") == 0)
continue;
- snprintf(temp_path, sizeof(temp_path), "pg_tblspc/%s/%s",
- spc_de->d_name, PG_TEMP_FILES_DIR);
+ snprintf(temp_path, sizeof(temp_path), "pg_tblspc/%s/%s/%s",
+ spc_de->d_name, TABLESPACE_VERSION_DIRECTORY, PG_TEMP_FILES_DIR);
RemovePgTempFilesInDir(temp_path);
}