MCPcopy Create free account
hub / github.com/apache/cloudberry / CreateDataDirLockFile

Function CreateDataDirLockFile

src/backend/utils/init/miscinit.c:1391–1395  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

1389 * postmaster.c will rewrite it upon creating the first Unix socket.
1390 */
1391void
1392CreateDataDirLockFile(bool amPostmaster)
1393{
1394 CreateLockFile(DIRECTORY_LOCK_FILE, amPostmaster, "", true, DataDir);
1395}
1396
1397/*
1398 * Create a lockfile for the specified Unix socket file.

Callers 3

PostgresMainFunction · 0.85
PostmasterMainFunction · 0.85
AuxiliaryProcessMainFunction · 0.85

Calls 1

CreateLockFileFunction · 0.85

Tested by

no test coverage detected