aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/file/fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/file/fd.c')
-rw-r--r--src/backend/storage/file/fd.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 78814d77b63..4875b7f2bcf 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.104 2003/12/12 18:45:09 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.105 2003/12/20 17:31:21 momjian Exp $
*
* NOTES:
*
@@ -53,11 +53,6 @@
#include "storage/ipc.h"
-/* Filename components for OpenTemporaryFile */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
-
/*
* Problem: Postgres does a system(ld...) to do dynamic loading.
* This will open several extra files in addition to those used by
@@ -1217,8 +1212,12 @@ RemovePgTempFiles(void)
{
while ((db_de = readdir(db_dir)) != NULL)
{
- if (strcmp(db_de->d_name, ".") == 0 ||
- strcmp(db_de->d_name, "..") == 0)
+ if (strcmp(db_de->d_name, ".") == 0
+#ifndef EXEC_BACKEND
+ /* no PG_TEMP_FILES_DIR in DataDir in non EXEC_BACKEND case */
+ || strcmp(db_de->d_name, "..") == 0
+#endif
+ )
continue;
snprintf(temp_path, sizeof(temp_path),