This PR adds compatibility for postgresql 12 major version.
The PG12 configuration is as close as the PG11 one. All defaults have
been kept back to avoid breaking backward compatibility within this
ansible role.
Here is a complete side-by-side diff between the current PG11 conf and
the new PG12 conf:
```diff
# 0 selects the syste # 0 selects the syste
> #tcp_user_timeout = 0 # TCP_USER_TIMEOUT, i
> # 0 selects the syste
> #shared_memory_type = mmap # the default is the
> # supported by the op
> # mmap
> # sysv
> # windows
> # (change requires re
dynamic_shared_memory_type = posix # the default is the dynamic_shared_memory_type = posix # the default is the
# supported by the op # supported by the op
# posix # posix
# sysv # sysv
# windows # windows
# mmap # mmap
# use none to disable <
# (change requires re # (change requires re
wal_level = logical # minimal, replica, o | wal_level = {{ postgres_wal_level }} # min
# (change requires re # (change requires re
wal_log_hints = on # also do full page w wal_log_hints = on # also do full page w
# (change requires re # (change requires re
> #wal_init_zero = on # zero-fill new WAL f
> #wal_recycle = on # recycle WAL files
# (change requires re # (change requires re
> # - Archive Recovery -
>
> # These are only used in recovery mode.
>
> {% if postgres_primary %}
> {# In PG < 12 versions all the recovery settings were in a se
> restore_command = '/usr/bin/barman-wal-restore --user barman
> # placeholders: %p = path of
> # %f = file nam
> # e.g. 'cp /mnt/server/archiv
> # (change requires restart)
> {% else %}
> #restore_command = '' # command to use to restore a
> # placeholders: %p = path of
> # %f = file nam
> # e.g. 'cp /mnt/server/archiv
> # (change requires restart)
> {% endif %}
> #archive_cleanup_command = '' # command to execute at every
> #recovery_end_command = '' # command to execute at compl
>
> # - Recovery Target -
>
> # Set these only when performing a targeted recovery.
>
> #recovery_target = '' # 'immediate' to end recovery
> # consistent state is reached
> # (change requires restart)
> #recovery_target_name = '' # the named restore point to
> # (change requires restart)
> #recovery_target_time = '' # the time stamp up to which
> # (change requires restart)
> #recovery_target_xid = '' # the transaction ID up to wh
> # (change requires restart)
> #recovery_target_lsn = '' # the WAL LSN up to which rec
> # (change requires restart)
> #recovery_target_inclusive = on # Specifies whether to stop:
> # just after the specified re
> # just before the recovery ta
> # (change requires restart)
> {% if postgres_primary %}
> {# In PG < 12 versions all the recovery settings were in a se
> recovery_target_timeline='latest' # 'current', 'latest'
> # (change requires restart)
> {% else %}
> #recovery_target_timeline = 'latest' # 'current', 'latest'
> # (change requires restart)
> {% endif %}
> #recovery_target_action = 'pause' # 'pause', 'promote',
> # (change requires restart)
max_wal_senders = 10 # max number of walsender pro | #max_wal_senders = 10 # max number of walsender pro
# (change requires restart) # (change requires restart)
> {% if postgres_primary %}
> {# In PG < 12 versions this setting was defined in separate r
> primary_conninfo = 'host={{ postgres_primary.host }} port={{
> # (change requires re
> {% else %}
> #primary_conninfo = '' # connection string t
> # (change requires re
> {% endif %}
> #primary_slot_name = '' # replication slot on
> # (change requires re
> {% if postgres_primary %}
> {# In PG < 12 versions this setting was defined in separate r
> promote_trigger_file = '/var/lib/postgresql/{{ postgres_versi
> {% else %}
> #promote_trigger_file = '' # file name whose pre
> {% endif %}
# retrieve WAL after # retrieve WAL after
> #recovery_min_apply_delay = 0 # minimum delay for a