diff --git a/patroni/postgresql/__init__.py b/patroni/postgresql/__init__.py index 3ca7d651..aeadc3e9 100644 --- a/patroni/postgresql/__init__.py +++ b/patroni/postgresql/__init__.py @@ -264,7 +264,7 @@ class Postgresql(object): cursor = None try: cursor = self._connection.cursor() - cursor.execute(sql, params) + cursor.execute(sql, params or None) return cursor except psycopg.Error as e: if cursor and cursor.connection.closed == 0: diff --git a/postgres0.yml b/postgres0.yml index 4e081de3..4a958ac8 100644 --- a/postgres0.yml +++ b/postgres0.yml @@ -91,7 +91,7 @@ bootstrap: # Some additional users users which needs to be created after initializing new cluster users: admin: - password: admin + password: admin% options: - createrole - createdb diff --git a/postgres1.yml b/postgres1.yml index 15a6897a..17ccfdc2 100644 --- a/postgres1.yml +++ b/postgres1.yml @@ -85,7 +85,7 @@ bootstrap: # Some additional users users which needs to be created after initializing new cluster users: admin: - password: admin + password: admin% options: - createrole - createdb diff --git a/postgres2.yml b/postgres2.yml index 829209ff..c17dd7d0 100644 --- a/postgres2.yml +++ b/postgres2.yml @@ -82,7 +82,7 @@ bootstrap: # Some additional users users which needs to be created after initializing new cluster users: admin: - password: admin + password: admin% options: - createrole - createdb