Skip to content

Commit

Permalink
postgresql_version: 15 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Jan 28, 2023
1 parent 41eb83d commit b71473c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions roles/patroni/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@
when:
- postgresql_stats_temp_directory_path is defined
- postgresql_stats_temp_directory_path != 'none'
- postgresql_version is version('14', '<=')
tags: patroni, pgsql_stats_tmp

- name: Prepare PostgreSQL | mount the statistics directory in memory (tmpfs)
Expand All @@ -345,6 +346,7 @@
when:
- postgresql_stats_temp_directory_path is defined
- postgresql_stats_temp_directory_path != 'none'
- postgresql_version is version('14', '<=')
tags: patroni, pgsql_stats_tmp

- name: Prepare PostgreSQL | make sure the postgresql log directory "{{ postgresql_log_dir }}" exists
Expand Down
2 changes: 1 addition & 1 deletion roles/patroni/templates/patroni.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ postgresql:
# password: rewind_password
parameters:
unix_socket_directories: {{ postgresql_unix_socket_dir }}
{% if postgresql_stats_temp_directory_path is defined and postgresql_stats_temp_directory_path != 'none' %}
{% if postgresql_stats_temp_directory_path is defined and postgresql_stats_temp_directory_path != 'none' and postgresql_version is version('14', '<=') %}
stats_temp_directory: {{ postgresql_stats_temp_directory_path }}
{% endif %}

Expand Down
1 change: 1 addition & 0 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ postgresql_unix_socket_dir: "/var/run/postgresql"
postgresql_home_dir: "/var/lib/postgresql"

# stats_temp_directory (mount the statistics directory in tmpfs)
# if postgresql_version < 15
postgresql_stats_temp_directory_path: "/var/lib/pgsql_stats_tmp" # or 'none'
postgresql_stats_temp_directory_size: "1024m"

Expand Down
1 change: 1 addition & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ postgresql_unix_socket_dir: "/var/run/postgresql"
postgresql_home_dir: "/var/lib/pgsql"

# stats_temp_directory (mount the statistics directory in tmpfs)
# if postgresql_version < 15
postgresql_stats_temp_directory_path: "/var/lib/pgsql_stats_tmp" # or 'none'
postgresql_stats_temp_directory_size: "1024m"

Expand Down
2 changes: 1 addition & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ consul_services:


# PostgreSQL variables
postgresql_version: "14"
postgresql_version: "15"
# postgresql_data_dir: see vars/Debian.yml or vars/RedHat.yml
postgresql_port: "5432"
postgresql_encoding: "UTF8" # for bootstrap only (initdb)
Expand Down

0 comments on commit b71473c

Please sign in to comment.