|
552 | 552 | - name: Prepare PostgreSQL | stop PostgreSQL (will be managed by patroni)
|
553 | 553 | become: true
|
554 | 554 | become_user: postgres
|
555 |
| - command: "/usr/bin/pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} stop -m fast" |
556 |
| - register: stop_result |
557 |
| - until: stop_result.rc == 0 |
558 |
| - retries: 300 |
559 |
| - delay: 10 |
| 555 | + command: "/usr/bin/pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} stop -m fast -- -w -t 600" |
560 | 556 | when: (checkpoint_result.rc is defined and checkpoint_result.rc == 0) and
|
561 | 557 | (ansible_os_family == "Debian" and postgresql_packages|join(" ") is not search("postgrespro"))
|
562 | 558 |
|
563 | 559 | # "RedHat" or PostgresPro
|
564 | 560 | - name: Prepare PostgreSQL | stop PostgreSQL (will be managed by patroni)
|
565 | 561 | become: true
|
566 | 562 | become_user: postgres
|
567 |
| - command: "{{ postgresql_bin_dir }}/pg_ctl stop -D {{ postgresql_data_dir }} -m fast" |
568 |
| - register: stop_result |
569 |
| - until: stop_result.rc == 0 |
570 |
| - retries: 300 |
571 |
| - delay: 10 |
| 563 | + command: "{{ postgresql_bin_dir }}/pg_ctl stop -D {{ postgresql_data_dir }} -m fast -w -t 600" |
572 | 564 | when: (checkpoint_result.rc is defined and checkpoint_result.rc == 0) and
|
573 | 565 | (ansible_os_family == "RedHat" or postgresql_packages|join(" ") is search("postgrespro"))
|
574 | 566 |
|
|
693 | 685 | failed_when: false
|
694 | 686 |
|
695 | 687 | - name: Stop PostgreSQL # "Debian"
|
696 |
| - command: "/usr/bin/pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} stop -m fast" |
697 |
| - register: stop_result |
698 |
| - until: stop_result.rc == 0 |
699 |
| - retries: 10 |
700 |
| - delay: 10 |
| 688 | + command: "/usr/bin/pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} stop -m fast -- -w -t 600" |
701 | 689 | when: ansible_os_family == "Debian" and
|
702 | 690 | (pg_ctl_status_result.rc is defined and pg_ctl_status_result.rc != 3)
|
703 | 691 |
|
704 | 692 | - name: Stop PostgreSQL # "RedHat" or PostgresPro
|
705 |
| - command: "{{ postgresql_bin_dir }}/pg_ctl stop -D {{ postgresql_data_dir }} -m fast" |
706 |
| - register: stop_result |
707 |
| - until: stop_result.rc == 0 |
708 |
| - retries: 10 |
709 |
| - delay: 10 |
| 693 | + command: "{{ postgresql_bin_dir }}/pg_ctl stop -D {{ postgresql_data_dir }} -m fast -w -t 600" |
710 | 694 | when: (ansible_os_family == "RedHat" or postgresql_packages|join(" ") is search("postgrespro")) and
|
711 | 695 | (pg_ctl_status_result.rc is defined and pg_ctl_status_result.rc != 3)
|
712 | 696 | when: patroni_cluster_bootstrap_method == "pgbackrest"
|
|
0 commit comments