aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/postinit.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-07-04 04:51:52 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-07-04 04:51:52 +0000
commiteb5949d190e80360386113fde0f05854f0c9824d (patch)
treef5683b4ff77c0b311ae975817b88c5ccc65ce5a9 /src/backend/utils/init/postinit.c
parent7504f0bae853b0b9fec03c8e361c8b1a4b1c3209 (diff)
downloadpostgresql-eb5949d190e80360386113fde0f05854f0c9824d.tar.gz
postgresql-eb5949d190e80360386113fde0f05854f0c9824d.zip
Arrange for the postmaster (and standalone backends, initdb, etc) to
chdir into PGDATA and subsequently use relative paths instead of absolute paths to access all files under PGDATA. This seems to give a small performance improvement, and it should make the system more robust against naive DBAs doing things like moving a database directory that has a live postmaster in it. Per recent discussion.
Diffstat (limited to 'src/backend/utils/init/postinit.c')
-rw-r--r--src/backend/utils/init/postinit.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 21b0650e827..18e60cab0f1 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.151 2005/06/28 19:51:23 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.152 2005/07/04 04:51:50 tgl Exp $
*
*
*-------------------------------------------------------------------------
@@ -338,12 +338,6 @@ InitPostgres(const char *dbname, const char *username)
ValidatePgVersion(fullpath);
- if (chdir(fullpath) == -1)
- ereport(FATAL,
- (errcode_for_file_access(),
- errmsg("could not change directory to \"%s\": %m",
- fullpath)));
-
SetDatabasePath(fullpath);
}