WALStorage returns the absolute path to the disk where an instance stores its WAL files. Use [WALDirectory] for the exact directory that Postgres uses.
(instance *v1beta1.PostgresInstanceSetSpec)
| 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. |
| 210 | func WALStorage(instance *v1beta1.PostgresInstanceSetSpec) string { |
| 211 | if instance.WALVolumeClaimSpec != nil { |
| 212 | return walMountPath |
| 213 | } |
| 214 | // When no WAL volume is specified, store WAL files on the main data volume. |
| 215 | return dataMountPath |
| 216 | } |
| 217 | |
| 218 | // Environment returns the environment variables required to invoke PostgreSQL |
| 219 | // utilities. |