Skip to content

Commit

Permalink
pg_old_bindir
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Nov 8, 2024
1 parent 37a8253 commit fbe6922
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion automation/roles/upgrade/tasks/initdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

- name: Get the current install user
ansible.builtin.command: >-
{{ postgresql_bin_dir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
{{ pg_old_bindir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
"select rolname from pg_roles where oid = 10"
changed_when: false
register: pg_install_user
Expand Down
4 changes: 2 additions & 2 deletions automation/roles/upgrade/tasks/schema_compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- name: Get the current shared_preload_libraries settings
ansible.builtin.command: >-
{{ postgresql_bin_dir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
{{ pg_old_bindir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
"show shared_preload_libraries"
changed_when: false
register: pg_shared_preload_libraries
Expand All @@ -11,7 +11,7 @@

- name: Get the current cron.database_name settings
ansible.builtin.command: >-
{{ postgresql_bin_dir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
{{ pg_old_bindir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
"select current_setting('cron.database_name', true)"
changed_when: false
register: pg_cron_database_name
Expand Down
6 changes: 3 additions & 3 deletions automation/roles/upgrade/tasks/stop_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- name: "Execute CHECKPOINT before stopping PostgreSQL"
ansible.builtin.command: >
{{ postgresql_bin_dir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc "CHECKPOINT"
{{ pg_old_bindir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc "CHECKPOINT"
async: "{{ pg_start_stop_timeout | int }}" # run the command asynchronously
poll: 0
register: checkpoint_result
Expand All @@ -18,7 +18,7 @@
# Wait for the window to appear without high replication lag before stopping PostgreSQL
- name: "Wait until replication lag is less than {{ max_replication_lag_bytes | human_readable }}"
ansible.builtin.command: >-
{{ postgresql_bin_dir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
{{ pg_old_bindir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
"select coalesce(max(pg_wal_lsn_diff(pg_current_wal_lsn(),replay_lsn)),1) as pg_lag_bytes
from pg_stat_replication"
register: pg_lag_bytes
Expand Down Expand Up @@ -51,7 +51,7 @@
# for compatibility with Postgres 9.x
- name: "Wait until replication lag is less than {{ max_replication_lag_bytes | human_readable }}"
ansible.builtin.command: >-
{{ postgresql_bin_dir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
{{ pg_old_bindir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
"select coalesce(max(pg_xlog_location_diff(pg_current_xlog_location(),replay_location)),1) as pg_lag_bytes
from pg_stat_replication"
register: pg_lag_bytes_9x
Expand Down
2 changes: 1 addition & 1 deletion automation/roles/upgrade/tasks/upgrade_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- name: Get the current shared_preload_libraries settings
ansible.builtin.command: >-
{{ postgresql_bin_dir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
{{ pg_old_bindir }}/psql -p {{ postgresql_port }} -U {{ patroni_superuser_username }} -d postgres -tAXc
"show shared_preload_libraries"
changed_when: false
register: pg_shared_preload_libraries_result
Expand Down

0 comments on commit fbe6922

Please sign in to comment.