Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion internal/patroni/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,11 @@ func instanceYAML(
} else {

initdb := []string{
// Pod "securityContext.fsGroup" ensures processes and filesystems agree on a GID.
// Group access ensures processes can access data regardless of their UID.
// NOTE: The "--allow-group-access" option was introduced in PostgreSQL v11.
"allow-group-access",

// Enable checksums on data pages to help detect corruption of
// storage that would otherwise be silent. This also enables
// "wal_log_hints" which is a prerequisite for using `pg_rewind`.
Expand All @@ -568,7 +573,7 @@ func instanceYAML(
"data-checksums",
"encoding=UTF8",

// NOTE(cbandy): The "--waldir" option was introduced in PostgreSQL v10.
// NOTE: The "--waldir" option was introduced in PostgreSQL v10.
"waldir=" + postgres.WALDirectory(cluster, instance),
}

Expand Down
3 changes: 3 additions & 0 deletions internal/patroni/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@ func TestInstanceYAML(t *testing.T) {
# Your changes will not be saved.
bootstrap:
initdb:
- allow-group-access
- data-checksums
- encoding=UTF8
- waldir=/pgdata/pg12_wal
Expand All @@ -708,6 +709,7 @@ tags: {}
# Your changes will not be saved.
bootstrap:
initdb:
- allow-group-access
- data-checksums
- encoding=UTF8
- waldir=/pgdata/pg12_wal
Expand Down Expand Up @@ -747,6 +749,7 @@ tags: {}
# Your changes will not be saved.
bootstrap:
initdb:
- allow-group-access
- data-checksums
- encoding=UTF8
- waldir=/pgdata/pg12_wal
Expand Down
Loading