Skip to content

Commit

Permalink
feat: enable configuration of full_page_writes (cloudnative-pg#5516)
Browse files Browse the repository at this point in the history
This patch enables users to customize the `full_page_writes` GUC in
PostgreSQL.

It is set to `on` by default as per PostgreSQL recommendation.

Closes cloudnative-pg#5506

Signed-off-by: zekiyeaydemir <[email protected]>
Signed-off-by: Jonathan Gonzalez V. <[email protected]>
Co-authored-by: Jonathan Gonzalez V. <[email protected]>
  • Loading branch information
zekiyeaydemir and sxd authored Sep 27, 2024
1 parent 708b58b commit 4e37e23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions docs/src/postgresql_conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ The **global default parameters** are:
```text
archive_mode = 'on'
dynamic_shared_memory_type = 'posix'
full_page_writes = 'on'
logging_collector = 'on'
log_destination = 'csvlog'
log_directory = '/controller/log'
Expand Down Expand Up @@ -111,7 +112,6 @@ The following parameters are **fixed** and exclusively controlled by the operato

```text
archive_command = '/controller/manager wal-archive %p'
full_page_writes = 'on'
hot_standby = 'true'
listen_addresses = '*'
port = '5432'
Expand Down Expand Up @@ -592,7 +592,6 @@ Users are not allowed to set the following configuration parameters in the
- `data_sync_retry`
- `event_source`
- `external_pid_file`
- `full_page_writes`
- `hba_file`
- `hot_standby`
- `ident_file`
Expand Down
3 changes: 1 addition & 2 deletions pkg/postgres/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ var (
// The following parameters need a reload to be applied
"archive_cleanup_command": blockedConfigurationParameter,
"archive_command": fixedConfigurationParameter,
"full_page_writes": fixedConfigurationParameter,
"log_destination": blockedConfigurationParameter,
"log_directory": blockedConfigurationParameter,
"log_file_mode": blockedConfigurationParameter,
Expand Down Expand Up @@ -467,6 +466,7 @@ var (
CnpgConfigurationSettings = ConfigurationSettings{
GlobalDefaultSettings: SettingsCollection{
"archive_timeout": "5min",
"full_page_writes": "on",
"max_parallel_workers": "32",
"max_worker_processes": "32",
"max_replication_slots": "32",
Expand Down Expand Up @@ -512,7 +512,6 @@ var (
"/controller/manager wal-archive --log-destination %s/%s.json %%p",
LogPath, LogFileName),
"port": fmt.Sprint(ServerPort),
"full_page_writes": "on",
"ssl": "on",
"ssl_cert_file": ServerCertificateLocation,
"ssl_key_file": ServerKeyLocation,
Expand Down

0 comments on commit 4e37e23

Please sign in to comment.