Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "archive_mode" to be on/off, or on/off/always >=9.5 #403

Merged
merged 3 commits into from
Mar 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ postgresql_checkpoint_warning: 30s # 0 disables
# - Archiving -

# allows archiving to be done
postgresql_archive_mode: off # Should be a string with quotes, but all templates need fixing first
postgresql_archive_mode: "off"

# Command to use to archive a logfile segment.
# Placeholders: %p = path of file to archive
Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-10.j2
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables

# - Archiving -

archive_mode = {{'on' if postgresql_archive_mode else 'off'}} # enables archiving; off, on, or always
archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else ( 'always' if postgresql_archive_mode == 'always' else 'off' ) }} # enables archiving; off, on, or always
# (change requires restart)
archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment
# placeholders: %p = path of file to archive
Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-9.1.j2
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables

# - Archiving -

archive_mode = {{'on' if postgresql_archive_mode else 'off'}} # allows archiving to be done
archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else 'off' }} # allows archiving to be done
# (change requires restart)
archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment
archive_timeout = {{postgresql_archive_timeout}} # force a logfile segment switch after this
Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-9.2.j2
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables

# - Archiving -

archive_mode = {{'on' if postgresql_archive_mode else 'off'}} # allows archiving to be done
archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else 'off' }} # allows archiving to be done
# (change requires restart)
archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment
# placeholders: %p = path of file to archive
Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-9.3.j2
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables

# - Archiving -

archive_mode = {{'on' if postgresql_archive_mode else 'off'}} # allows archiving to be done
archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else 'off' }} # allows archiving to be done
# (change requires restart)
archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment
# placeholders: %p = path of file to archive
Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-9.4.j2
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables

# - Archiving -

archive_mode = {{'on' if postgresql_archive_mode else 'off'}} # allows archiving to be done
archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else 'off' }} # allows archiving to be done
# (change requires restart)
archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment
# placeholders: %p = path of file to archive
Expand Down
3 changes: 2 additions & 1 deletion templates/postgresql.conf-9.5.j2
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables

# - Archiving -

archive_mode = {{'on' if postgresql_archive_mode else 'off'}} # enables archiving; off, on, or always
archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else ( 'always' if postgresql_archive_mode == 'always' else 'off' ) }} # enables archiving; off, on, or always
# (change requires restart)
archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment
# placeholders: %p = path of file to archive
# %f = file name only
Expand Down
3 changes: 2 additions & 1 deletion templates/postgresql.conf-9.6.j2
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables

# - Archiving -

archive_mode = {{'on' if postgresql_archive_mode else 'off'}} # enables archiving; off, on, or always
archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else ( 'always' if postgresql_archive_mode == 'always' else 'off' ) }} # enables archiving; off, on, or always
# (change requires restart)
archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment
# placeholders: %p = path of file to archive
# %f = file name only
Expand Down