mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Add docstrings to patroni.config (#2708)
Besides adding docstrings to `patroni.config`, a few side changes have been applied: * Reference `config_file` property instead of internal attribute `_config_file` in method `_load_config_file`; * Have `_AUTH_ALLOWED_PARAMETERS[:2]` as default value of `params` argument in method `_get_auth` instead of using `params or _AUTH_ALLOWED_PARAMETERS[:2]` in the body; * Use `len(PATRONI_ENV_PREFIX)` instead of a hard-coded `8` when removing the prefix from environment variable names; * Fix documentation of `wal_log_hints` setting. The previous docs mentioned it was a dynamic setting that could be changed. However it is managed by Patroni, which forces `on` value. References: PAT-123.
This commit is contained in:
@@ -44,7 +44,6 @@ Some of the PostgreSQL parameters **must hold the same values on the primary and
|
||||
- **max_worker_processes**: 8
|
||||
- **max_prepared_transactions**: 0
|
||||
- **wal_level**: hot_standby
|
||||
- **wal_log_hints**: on
|
||||
- **track_commit_timestamp**: off
|
||||
|
||||
For the parameters below, PostgreSQL does not require equal values among the primary and all the replicas. However, considering the possibility of a replica to become the primary at any time, it doesn't really make sense to set them differently; therefore, **Patroni restricts setting their values to the** :ref:`dynamic configuration <dynamic_configuration>`.
|
||||
@@ -62,6 +61,7 @@ There are some other Postgres parameters controlled by Patroni:
|
||||
- **port** - is set either from ``postgresql.listen`` or from ``PATRONI_POSTGRESQL_LISTEN`` environment variable
|
||||
- **cluster_name** - is set either from ``scope`` or from ``PATRONI_SCOPE`` environment variable
|
||||
- **hot_standby: on**
|
||||
- **wal_log_hints: on** - for Postgres 9.4 and newer.
|
||||
|
||||
To be on the safe side parameters from the above lists are not written into ``postgresql.conf``, but passed as a list of arguments to the ``pg_ctl start`` which gives them the highest precedence, even above `ALTER SYSTEM <https://www.postgresql.org/docs/current/static/sql-altersystem.html>`__
|
||||
|
||||
|
||||
Reference in New Issue
Block a user