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

Function SetDataDir

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

* Set data directory, but make sure it's an absolute path. Use this, * never set DataDir directly. */

Source from the content-addressed store, hash-verified

410 * never set DataDir directly.
411 */
412void
413SetDataDir(const char *dir)
414{
415 char *new;
416
417 AssertArg(dir);
418
419 /* If presented path is relative, convert to absolute */
420 new = make_absolute_path(dir);
421
422 if (DataDir)
423 free(DataDir);
424 DataDir = new;
425}
426
427/*
428 * Change working directory to DataDir. Most of the postmaster and backend

Callers 2

SelectConfigFilesFunction · 0.85

Calls 1

make_absolute_pathFunction · 0.85

Tested by

no test coverage detected