Skip to content

Commit d3d57c9

Browse files
author
Michael Conrad
committed
Handle synchronous_standby_names defaults better
1 parent c99d889 commit d3d57c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ postgresql_track_commit_timestamp: off # (>= 9.5)
290290

291291
# standby servers that provide sync rep.
292292
# number of sync standbys (>= 9.6) and comma-separated list of application_name from standby(s)
293-
postgresql_synchronous_standby_num_sync: 1
293+
postgresql_synchronous_standby_num_sync: ''
294294
postgresql_synchronous_standby_names: [] # '*' means 'all'
295295

296296
# number of xacts by which cleanup is delayed

templates/postgresql.conf-9.6.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ track_commit_timestamp = {{'on' if postgresql_track_commit_timestamp else 'off'
244244

245245
# These settings are ignored on a standby server.
246246

247-
synchronous_standby_names = '{{postgresql_synchronous_standby_num_sync}} ({{postgresql_synchronous_standby_names|join(',')}})' # standby servers that provide sync rep
247+
synchronous_standby_names = '{{postgresql_synchronous_standby_num_sync}}{% if postgresql_synchronous_standby_names != [] %} ({{postgresql_synchronous_standby_names|join(',')}}){% endif %}' # standby servers that provide sync rep
248248
# number of sync standbys and comma-separated list of application_name
249249
# from standby(s); '*' = all
250250
vacuum_defer_cleanup_age = {{postgresql_vacuum_defer_cleanup_age}} # number of xacts by which cleanup is delayed

0 commit comments

Comments
 (0)