diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-07-04 04:51:52 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-07-04 04:51:52 +0000 |
commit | eb5949d190e80360386113fde0f05854f0c9824d (patch) | |
tree | f5683b4ff77c0b311ae975817b88c5ccc65ce5a9 /src/backend/tcop/postgres.c | |
parent | 7504f0bae853b0b9fec03c8e361c8b1a4b1c3209 (diff) | |
download | postgresql-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/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 534e4796611..6973e9d3b3c 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.451 2005/06/29 22:51:55 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.452 2005/07/04 04:51:49 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2809,8 +2809,6 @@ PostgresMain(int argc, char *argv[], const char *username) errhint("Try \"%s --help\" for more information.", argv[0]))); } - XLOGPathInit(); - BaseInit(); } else @@ -2841,12 +2839,14 @@ PostgresMain(int argc, char *argv[], const char *username) Assert(DataDir); ValidatePgVersion(DataDir); + /* Change into DataDir (if under postmaster, was done already) */ + ChangeToDataDir(); + /* * Create lockfile for data directory. */ - CreateDataDirLockFile(DataDir, false); + CreateDataDirLockFile(false); - XLOGPathInit(); BaseInit(); /* |