diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-08-26 22:00:19 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-08-26 22:00:19 +0000 |
commit | 73b3bd5574099ac0f6a174852ce224d55d0cdf78 (patch) | |
tree | 739b31e8d6b9921f39edb93af9ce915d034f6743 /src | |
parent | 48322916559607e5b6a85f30a8e5307baf9cac3d (diff) | |
download | postgresql-73b3bd5574099ac0f6a174852ce224d55d0cdf78.tar.gz postgresql-73b3bd5574099ac0f6a174852ce224d55d0cdf78.zip |
Document the existence of the socket lock file under unix_socket_directory,
which is perhaps not a terribly good spot for it but there doesn't seem to be
a better place. Also add a source-code comment pointing out a couple reasons
for having a separate lock file. Per suggestion from Greg Smith.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/libpq/pqcomm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 360524f50ab..b524d262e08 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -30,7 +30,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.212 2010/07/08 16:19:50 mha Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.213 2010/08/26 22:00:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -484,6 +484,11 @@ Lock_AF_UNIX(unsigned short portNumber, char *unixSocketName) /* * Grab an interlock file associated with the socket file. + * + * Note: there are two reasons for using a socket lock file, rather than + * trying to interlock directly on the socket itself. First, it's a lot + * more portable, and second, it lets us remove any pre-existing socket + * file without race conditions. */ CreateSocketLockFile(sock_path, true); |