MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / DataDirectory

Function DataDirectory

internal/postgres/config.go:124–126  ·  view source on GitHub ↗

DataDirectory returns the absolute path to the "data_directory" of cluster. - https://www.postgresql.org/docs/current/runtime-config-file-locations.html

(cluster *v1beta1.PostgresCluster)

Source from the content-addressed store, hash-verified

122// DataDirectory returns the absolute path to the "data_directory" of cluster.
123// - https://www.postgresql.org/docs/current/runtime-config-file-locations.html
124func DataDirectory(cluster *v1beta1.PostgresCluster) string {
125 return fmt.Sprintf("%s/pg%d", DataStorage(cluster), cluster.Spec.PostgresVersion)
126}
127
128// DataStorage returns the absolute path to the disk where cluster stores its data.
129// Use [DataDirectory] for the exact directory that Postgres uses.

Callers 9

reconcileRestoreJobMethod · 0.92
instanceEnvironmentFunction · 0.92
instanceYAMLFunction · 0.92
TestDataDirectoryFunction · 0.85
sanitizeLogDirectoryFunction · 0.85
ConfigDirectoryFunction · 0.85
startupCommandFunction · 0.85

Calls 1

DataStorageFunction · 0.85

Tested by 1

TestDataDirectoryFunction · 0.68