ClusterLabs / ClusterLabs/resource-agents

pgsql - PostgreSQL 9.6 slave can't promote to master. Slave's score stay at -INFINITY

Open
#1,234 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
519
Forks
608
Avg merge
6d 1h
Merged PRs (30d)
7

Description

Hi,
I recently setup a PostgreSQL cluster running PG 9.6. ( I have been using Pacemaker+PostgreSQL 9.4 for many years without any issues ). Everything is running fine except the score for slave stay at "-INFINITY" with prohibit the slave node to pick up master role. I even tried to override it with " /usr/sbin/crm_attribute -l reboot -N postgres-n02 -n master-pgsqld -v 100". It changed the score to 100 but within few seconds, it will change back to "-INFINITY".

Did I miss something that require with PostgreSQL 9.6 setup?

Stack: cman
Current DC: postgres-n01 (version 1.1.18-3.el6-bfe4e80420) - partition with quorum
Last updated: Mon Oct 8 17:11:05 2018
Last change: Mon Oct 8 17:10:55 2018 by root via crm_attribute on postgres-n01

2 nodes configured
4 resources configured

Online: [ postgres-n01 postgres-n02 ]

Full list of resources:

Master/Slave Set: pgsqld-master [pgsqld]
Masters: [ postgres-n01 ]
Slaves: [ postgres-n02 ]
Resource Group: master-group
pgsql-master-ip (ocf::heartbeat:IPaddr2): Started postgres-n01

Node Attributes:
* Node postgres-n01:
+ master-pgsqld : 1000
+ pgsqld-data-status : LATEST
+ pgsqld-master-baseline : 0000000006000098
+ pgsqld-status : PRI
* Node postgres-n02:
+ master-pgsqld : -INFINITY
+ pgsqld-data-status : STREAMING|ASYNC
+ pgsqld-status : HS:async

Migration Summary:
* Node postgres-n01:
* Node postgres-n02:

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported pgsqld master/slave state and the /usr/sbin/crm_attribute command, then trace why the master-pgsqld score returns to -INFINITY on PostgreSQL 9.6. No source file or test is named; done means identifying the resource-agent behavior causing the reset and confirming that a healthy slave can be promoted without the score being reverted.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.