-
-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
--- | ||
- name: Check PostgreSQL replication status | ||
postgresql_query: | ||
query: "SELECT * FROM pg_stat_wal_receiver;" | ||
query: "SELECT pg_is_in_recovery(), count(*) FROM pg_stat_wal_receiver;" | ||
login_unix_socket: "{{ postgresql_unix_socket_dir }}" | ||
login_port: "{{ postgresql_port }}" | ||
login_user: "{{ patroni_superuser_username }}" | ||
login_db: template1 | ||
register: pg_replication_status | ||
failed_when: "pg_replication_status.rowcount == 0" | ||
when: "'replica' in group_names" | ||
failed_when: "pg_replication_status.query_result[0].pg_is_in_recovery and pg_replication_status.query_result[0].count == 0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters