diff options
author | Tom Lane | 2005-07-04 04:51:52 +0000 |
---|---|---|
committer | Tom Lane | 2005-07-04 04:51:52 +0000 |
commit | eb5949d190e80360386113fde0f05854f0c9824d (patch) | |
tree | f5683b4ff77c0b311ae975817b88c5ccc65ce5a9 /src/include/miscadmin.h | |
parent | 7504f0bae853b0b9fec03c8e361c8b1a4b1c3209 (diff) |
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/include/miscadmin.h')
-rw-r--r-- | src/include/miscadmin.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 8f6930cd131..1ee085e51a0 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.176 2005/06/28 05:09:04 tgl Exp $ + * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.177 2005/07/04 04:51:52 tgl Exp $ * * NOTES * some of the information in this file should be moved to other files. @@ -238,6 +238,7 @@ extern void InitializeSessionUserIdStandalone(void); extern void SetSessionAuthorization(Oid roleid, bool is_superuser); extern void SetDataDir(const char *dir); +extern void ChangeToDataDir(void); extern char *make_absolute_path(const char *path); /* in utils/misc/superuser.c */ @@ -309,7 +310,7 @@ extern void SetReindexProcessing(Oid heapOid, Oid indexOid); extern void ResetReindexProcessing(void); extern bool ReindexIsProcessingHeap(Oid heapOid); extern bool ReindexIsProcessingIndex(Oid indexOid); -extern void CreateDataDirLockFile(const char *datadir, bool amPostmaster); +extern void CreateDataDirLockFile(bool amPostmaster); extern void CreateSocketLockFile(const char *socketfile, bool amPostmaster); extern void TouchSocketLockFile(void); extern void RecordSharedMemoryInLockFile(unsigned long id1, |