1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Tom Lane
2010-08-26 22:00:19 +00:00
parent 4832291655
commit 73b3bd5574
2 changed files with 64 additions and 33 deletions

View File

@ -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);