Skip to content

Commit

Permalink
Update sync standby names to include choose keyword.
Browse files Browse the repository at this point in the history
This copies the logic to render the string from the pg-10 template.
  • Loading branch information
UmanShahzad committed Jan 16, 2020
1 parent 97d6d5c commit 5ad154b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/postgresql.conf-11.j2
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,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 }}{% if postgresql_synchronous_standby_names != [] %} ({{ postgresql_synchronous_standby_names | join(',') }}){% endif %}' # standby servers that provide sync rep
synchronous_standby_names = '{% if postgresql_synchronous_standby_names != [] %}{% if postgresql_synchronous_standby_choose_sync != "" and postgresql_synchronous_standby_num_sync != "" %}{{ postgresql_synchronous_standby_choose_sync }} {% endif %}{% if postgresql_synchronous_standby_num_sync != "" %}{{ postgresql_synchronous_standby_num_sync }} ({% endif %}"{{ postgresql_synchronous_standby_names | join('\",\"') }}"{% if postgresql_synchronous_standby_num_sync != "" %}){% endif %}{% endif %}' # standby servers that provide sync rep
# method to choose sync standbys, number of sync standbys,
# and comma-separated list of application_name
# from standby(s); '*' = all
Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-12.j2
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,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 }}{% if postgresql_synchronous_standby_names != [] %} ({{ postgresql_synchronous_standby_names | join(',') }}){% endif %}' # standby servers that provide sync rep
synchronous_standby_names = '{% if postgresql_synchronous_standby_names != [] %}{% if postgresql_synchronous_standby_choose_sync != "" and postgresql_synchronous_standby_num_sync != "" %}{{ postgresql_synchronous_standby_choose_sync }} {% endif %}{% if postgresql_synchronous_standby_num_sync != "" %}{{ postgresql_synchronous_standby_num_sync }} ({% endif %}"{{ postgresql_synchronous_standby_names | join('\",\"') }}"{% if postgresql_synchronous_standby_num_sync != "" %}){% endif %}{% endif %}' # standby servers that provide sync rep
# method to choose sync standbys, number of sync standbys,
# and comma-separated list of application_name
# from standby(s); '*' = all
Expand Down

0 comments on commit 5ad154b

Please sign in to comment.