From d1fdb45179807f2c3b9b113031e90862205987ed Mon Sep 17 00:00:00 2001 From: Polina Bungina <27892524+hughcapet@users.noreply.github.com> Date: Wed, 24 May 2023 09:28:57 +0200 Subject: [PATCH] Make bootstrap.initdb optional (#2685) --- docs/yaml_configuration.rst | 2 +- patroni/validator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/yaml_configuration.rst b/docs/yaml_configuration.rst index dd84f7cb..598143a7 100644 --- a/docs/yaml_configuration.rst +++ b/docs/yaml_configuration.rst @@ -38,7 +38,7 @@ Bootstrap configuration See :ref:`custom bootstrap methods documentation ` for details. When ``initdb`` is specified revert to the default ``initdb`` command. ``initdb`` is also triggered when no ``method`` parameter is present in the configuration file. - - **initdb**: List options to be passed on to initdb. + - **initdb**: (optional) list options to be passed on to initdb. - **- data-checksums**: Must be enabled when pg_rewind is needed on 9.3. - **- encoding: UTF8**: default encoding for new databases. diff --git a/patroni/validator.py b/patroni/validator.py index ccf41fd0..9a4b117c 100644 --- a/patroni/validator.py +++ b/patroni/validator.py @@ -773,7 +773,7 @@ schema = Schema({ Optional("retry_timeout"): int, Optional("maximum_lag_on_failover"): int }, - "initdb": [Or(str, dict)] + Optional("initdb"): [Or(str, dict)] }, Or(*available_dcs): Case({ "consul": {