diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-29 20:59:54 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-11-29 20:59:54 +0000 |
commit | 792b0f4666b6ea6346aa8d29b568e5d3fe1fcef5 (patch) | |
tree | df4cff9d3d2bfbae0ff00928965e5751649e942b /src/include/miscadmin.h | |
parent | 1efd7330cbdd50fc2c9b065e63db357b539a4d1d (diff) | |
download | postgresql-792b0f4666b6ea6346aa8d29b568e5d3fe1fcef5.tar.gz postgresql-792b0f4666b6ea6346aa8d29b568e5d3fe1fcef5.zip |
Get rid of not-very-portable fcntl(F_SETLK) mechanism for locking the Unix
socket file, in favor of having an ordinary lockfile beside the socket file.
Clean up a few robustness problems in the lockfile code. If postmaster is
going to reject a connection request based on database state, it will now
tell you so before authentication exchange not after. (Of course, a failure
after is still possible if conditions change meanwhile, but this makes life
easier for a yet-to-be-written pg_ping utility.)
Diffstat (limited to 'src/include/miscadmin.h')
-rw-r--r-- | src/include/miscadmin.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index cff6439dde3..f41a01822ac 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: miscadmin.h,v 1.74 2000/11/25 22:34:13 momjian Exp $ + * $Id: miscadmin.h,v 1.75 2000/11/29 20:59:54 tgl Exp $ * * NOTES * some of the information in this file will be moved to @@ -114,7 +114,7 @@ extern int PostPortNumber; extern int Unix_socket_permissions; extern char *Unix_socket_group; extern char *UnixSocketDir; -extern char *Virtual_host; +extern char *VirtualHost; /***************************************************************************** @@ -227,17 +227,8 @@ extern bool IsIgnoringSystemIndexes(void); extern bool IsCacheInitialized(void); extern void SetWaitingForLock(bool); -/* - * "postmaster.pid" is a file containing postmaster's pid, being - * created uder $PGDATA upon postmaster's starting up. When postmaster - * shuts down, it will be unlinked. -*/ -#define PIDFNAME "postmaster.pid" - -extern void SetPidFname(char *datadir); -extern void UnlinkPidFile(void); -extern int SetPidFile(pid_t pid); - +extern bool CreateDataDirLockFile(const char *datadir, bool amPostmaster); +extern bool CreateSocketLockFile(const char *socketfile, bool amPostmaster); extern void ValidatePgVersion(const char *path); |