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)
| 122 | // DataDirectory returns the absolute path to the "data_directory" of cluster. |
| 123 | // - https://www.postgresql.org/docs/current/runtime-config-file-locations.html |
| 124 | func 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. |