src/backend/utils/init/miscinit.c
/*
 * Create the data directory lockfile.
 *
 * When this is called, we must have already switched the working
 * directory to DataDir, so we can just use a relative path.  This
 * helps ensure that we are locking the directory we should be.
 *
 * Note that the socket directory path line is initially written as empty.
 * postmaster.c will rewrite it upon creating the first Unix socket.
 */
Create the data directory lockfile.
When this is called, we must have already switched the working
directory to DataDir, so we can just use a relative path.  This
helps ensure that we are locking the directory we should be.

Note that the socket directory path line is initially written as empty.
postmaster.c will rewrite it upon creating the first Unix socket.
Create the data directory lockfile . When this is called we must have already switched the working directory to DataDir so we can just use a relative path . This helps ensure that we are locking the directory we should be . Note that the socket directory path line is initially written as empty . postmaster . c will rewrite it upon creating the first Unix socket .
void
CreateDataDirLockFile(bool amPostmaster)
{
	CreateLockFile(DIRECTORY_LOCK_FILE, amPostmaster, "", true, DataDir);
}
void CreateDataDirLockFile ( bool amPostmaster ) { CreateLockFile ( DIRECTORY_LOCK_FILE , amPostmaster , " " , true , DataDir ) ; }
Create the data directory lockfile.
Create the data directory lockfile .