From 60d8bc3a70e95a183da9bba1917062642a0171f8 Mon Sep 17 00:00:00 2001 From: GuanqunYang193 <144971563+GuanqunYang193@users.noreply.github.com> Date: Tue, 17 Oct 2023 07:04:59 -0400 Subject: [PATCH] Add warning of removing user creation (#2893) --- patroni/postgresql/bootstrap.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/patroni/postgresql/bootstrap.py b/patroni/postgresql/bootstrap.py index 26025e43..8a9b0fba 100644 --- a/patroni/postgresql/bootstrap.py +++ b/patroni/postgresql/bootstrap.py @@ -400,6 +400,9 @@ BEGIN END;$$""".format(f, quote_ident(rewind['username'], postgresql.connection())) postgresql.query(sql) + if config.get('users'): + logger.warning('User creation via "bootstrap.users" will be removed in v4.0.0') + for name, value in (config.get('users') or {}).items(): if all(name != a.get('username') for a in (superuser, replication, rewind)): self.create_or_update_role(name, value.get('password'), value.get('options', []))