Skip to content

Commit b62fc6e

Browse files
committed
Add documentation for automaticPgRestart
Co-authored-by: Prabhu Jayakumar <[email protected]> Signed-off-by: Aswin Karthik <[email protected]>
1 parent 531df56 commit b62fc6e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/cluster_spec.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ Some options in a running cluster specification can be changed to update the des
3636
| pitrConfig | configuration for initMode of type "pitr" | if initMode is "pitr" | PITRConfig | |
3737
| standbyConfig | standby config when the cluster is a standby cluster | if role is "standby" | StandbyConfig | |
3838
| pgParameters | a map containing the postgres server parameters and their values. The parameters value don't have to be quoted and single quotes don't have to be doubled since this is already done by the keeper when writing the postgresql.conf file | no | map[string]string | |
39-
| pgHBA | a list containing additional pg_hba.conf entries. They will be added to the pg_hba.conf generated by stolon. **NOTE**: these lines aren't validated so if some of them are wrong postgres will refuse to start or, on reload, will log a warning and ignore the updated pg_hba.conf file | no | []string | null. Will use the default behiavior of accepting connections from all hosts for all dbs and users with md5 password authentication |
39+
| pgHBA | a list containing additional pg_hba.conf entries. They will be added to the pg_hba.conf generated by stolon. **NOTE**: these lines aren't validated so if some of them are wrong postgres will refuse to start or, on reload, will log a warning and ignore the updated pg_hba.conf file | no | []string | null. Will use the default behiavior of accepting connections from all hosts for all dbs and users with md5 password authentication |
40+
| automaticPgRestart | restart postgres automatically after changing the pgParameters that requires restart. Refer `pending_restart` in [pg_settings](https://www.postgresql.org/docs/9.5/static/view-pg-settings.html) | no | bool | false |
4041

4142
#### ExistingConfig
4243

doc/postgres_parameters.md

+4
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ To disable this behavior just set `mergePgParameters` to false in the cluster sp
4848
Since postgresql.auto.conf overrides postgresql.conf parameters, changing some of them with ALTER SYSTEM could break the cluster (parameters managed by stolon could be overridden) and make pg parameters different between the instances.
4949

5050
To avoid this stolon disables the execution of ALTER SYSTEM commands making postgresql.auto.conf a symlink to /dev/null. When an ALTER SYSTEM command is executed it'll return an error.
51+
52+
## Restart postgres on changing some pg parameters
53+
54+
There are some pg parameters which requires postgres restart to take effect after changing. For example, changing `max_connections` will not take effect till the underlying postgres is restarted. This is disabled by default and can be enabled using the clusterSpecification `automaticPgRestart`. This is achieved using `pending_restart` in [pg_settings](https://www.postgresql.org/docs/9.5/static/view-pg-settings.html) for postgres 9.5 and above and the `context` column of `pg_settings` for lower versions (<= 9.4).

0 commit comments

Comments
 (0)