Skip to content
Prev Previous commit
Next Next commit
Handle synchronous_standby_names defaults better
  • Loading branch information
Michael Conrad committed Oct 11, 2016
commit d3d57c9d835e228b7e1485083ceb69880b062f03
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ postgresql_track_commit_timestamp: off # (>= 9.5)

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

# number of xacts by which cleanup is delayed
Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-9.6.j2
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ track_commit_timestamp = {{'on' if postgresql_track_commit_timestamp else 'off'

# These settings are ignored on a standby server.

synchronous_standby_names = '{{postgresql_synchronous_standby_num_sync}} ({{postgresql_synchronous_standby_names|join(',')}})' # standby servers that provide sync rep
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
# number of sync standbys and comma-separated list of application_name
# from standby(s); '*' = all
vacuum_defer_cleanup_age = {{postgresql_vacuum_defer_cleanup_age}} # number of xacts by which cleanup is delayed
Expand Down