Public bug reported:

After setting up a PostgreSQL resource in a 2-node Focal cluster and
trying to switch the Master and Slave, I got the following failure:

Failed Resource Actions:
  * postgresql_start_0 on focal01 'error' (1): call=78, status='complete', 
exitreason='My data may be inconsistent. You have to remove 
/var/lib/pgsql/tmp/PGSQL.lock file to force start.', last-rc-change='1970-01-01 
05:56:56Z', queued=437ms, exec=115773ms


This is a known issue described here:

https://www.suse.com/support/kb/doc/?id=000019252

The workaround is to remove the /var/lib/pgsql/tmp/PGSQL.lock file and
put the node back online with 'crm node online <node name>'

As reference this is my CIB:

node 1: focal01
node 2: focal02
primitive postgresql pgsql \
        params pgctl="/usr/lib/postgresql/12/bin/pg_ctl" 
pgdata="/var/lib/postgresql/12/main" psql="/usr/bin/psql" 
config="/etc/postgresql/12/main/postgresql.conf" rep_mode=sync 
master_ip=192.168.3.3 repuser=replicator restart_on_promote=true 
check_wal_receiver=true node_list="focal01 focal02" \
        op monitor timeout=30 interval=2
primitive vip_public IPaddr2 \
        params ip=192.168.3.4 cidr_netmask=24 \
        op monitor interval=10s
primitive vip_replica IPaddr2 \
        params ip=192.168.3.3 cidr_netmask=24 \
        op monitor interval=10s
ms master_postgresql postgresql \
        meta notify=true master-max=1 master-node-max=1 clone-max=2 
clone-node-max=1 target-role=Master
location cli-ban-vip_public-on-focal01 vip_public role=Started -inf: focal01
order order-vip_replica-psql_master-vip_public inf: vip_replica:start 
master_postgresql:promote vip_public:start
colocation psql_master_and_vips inf: master_postgresql vip_public vip_replica
property cib-bootstrap-options: \
        have-watchdog=false \
        dc-version=2.0.3-4b1f869f0f \
        cluster-infrastructure=corosync \
        cluster-name=cluster01 \
        stonith-enabled=false \
        last-lrm-refresh=1603131710
rsc_defaults rsc-options: \
        resource-stickiness=100

** Affects: resource-agents (Ubuntu)
     Importance: Undecided
         Status: Triaged

** Affects: resource-agents (Ubuntu Focal)
     Importance: Undecided
         Status: Confirmed

** Also affects: resource-agents (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Changed in: resource-agents (Ubuntu Focal)
       Status: New => Confirmed

** Changed in: resource-agents (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1900613

Title:
  PostgreSQL resource fails to start with "My data may be inconsistent"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/1900613/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to