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

Function WALDirectory

internal/postgres/config.go:202–206  ·  view source on GitHub ↗

WALDirectory returns the absolute path to the directory where an instance stores its WAL files. - https://www.postgresql.org/docs/current/wal.html

(
	cluster *v1beta1.PostgresCluster, instance *v1beta1.PostgresInstanceSetSpec,
)

Source from the content-addressed store, hash-verified

200// stores its WAL files.
201// - https://www.postgresql.org/docs/current/wal.html
202func WALDirectory(
203 cluster *v1beta1.PostgresCluster, instance *v1beta1.PostgresInstanceSetSpec,
204) string {
205 return fmt.Sprintf("%s/pg%d_wal", WALStorage(instance), cluster.Spec.PostgresVersion)
206}
207
208// WALStorage returns the absolute path to the disk where an instance stores its
209// WAL files. Use [WALDirectory] for the exact directory that Postgres uses.

Callers 7

reconcileRestoreJobMethod · 0.92
instanceYAMLFunction · 0.92
ReplicaCreateCommandFunction · 0.92
TestWALDirectoryFunction · 0.85
startupCommandFunction · 0.85

Calls 1

WALStorageFunction · 0.85

Tested by 2

TestWALDirectoryFunction · 0.68