Blame SOURCES/bz1795535-pgsql-2-fix-uppercase-hostname-support.patch

030326
From e56d0e1727bf84d0664db544a129a0237a1757c0 Mon Sep 17 00:00:00 2001
030326
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
030326
Date: Fri, 11 Sep 2020 10:12:21 +0200
030326
Subject: [PATCH 1/2] pgsql: lower-case application_name to avoid issues with
030326
 upper-case hostnames
030326
030326
---
030326
 heartbeat/pgsql | 2 +-
030326
 1 file changed, 1 insertion(+), 1 deletion(-)
030326
030326
diff --git a/heartbeat/pgsql b/heartbeat/pgsql
030326
index 99e074287..de9f750c5 100755
030326
--- a/heartbeat/pgsql
030326
+++ b/heartbeat/pgsql
030326
@@ -1960,7 +1960,7 @@ pgsql_validate_all() {
030326
         else
030326
             CHECK_XLOG_LOC_SQL="select pg_last_xlog_replay_location(),pg_last_xlog_receive_location()"
030326
         fi
030326
-        CHECK_REPLICATION_STATE_SQL="select application_name,upper(state),upper(sync_state) from pg_stat_replication"
030326
+        CHECK_REPLICATION_STATE_SQL="select lower(application_name),upper(state),upper(sync_state) from pg_stat_replication"
030326
 
030326
         PGSQL_STATUS_ATTR="${RESOURCE_NAME}-status"
030326
         PGSQL_DATA_STATUS_ATTR="${RESOURCE_NAME}-data-status"
030326
030326
From 5aee799878180bb8daca82aebc2290c2735045eb Mon Sep 17 00:00:00 2001
030326
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
030326
Date: Fri, 11 Sep 2020 10:13:47 +0200
030326
Subject: [PATCH 2/2] pgsql: set exit-reason when failing due to remaining
030326
 PGSQL.lock
030326
030326
---
030326
 heartbeat/pgsql | 3 +++
030326
 1 file changed, 3 insertions(+)
030326
030326
diff --git a/heartbeat/pgsql b/heartbeat/pgsql
030326
index de9f750c5..5a0628b7a 100755
030326
--- a/heartbeat/pgsql
030326
+++ b/heartbeat/pgsql
030326
@@ -966,6 +966,9 @@ pgsql_real_monitor() {
030326
     if ! pgsql_status
030326
     then
030326
         ocf_log info "PostgreSQL is down"
030326
+        if [ "$__OCF_ACTION" = "monitor" ] && ! ocf_is_probe && [ -f $PGSQL_LOCK ]; then
030326
+            ocf_exit_reason "My data may be inconsistent. You have to remove $PGSQL_LOCK file to force start."
030326
+        fi
030326
         return $OCF_NOT_RUNNING
030326
     fi
030326