ClusterLabs / PAF

PostgreSQL Automatic Failover: High-Availibility for Postgres, based on Pacemaker and Corosync.
http://clusterlabs.github.io/PAF/
Other
342 stars 55 forks source link

Display more informations about pgsql #130

Closed StephenSorriaux closed 6 years ago

StephenSorriaux commented 6 years ago

Hello,

I am currently using PAF (2.2.0) with Corosync (2.4.0)/Pacemaker(1.1.16-12.el7_4.7) to manage a 2-nodes postgresql cluster and everything works great.

I just wanted to know if it is possible to get more information about postgresql ? With the "old" RA "pgsql", it was possible to display the type of replication and the baseline :

`Node Attributes:

ioguix commented 6 years ago

Hi @StephenSorriaux,

These informations from the pgsql resource agent are actually some internal attributes the RA "store" in the cluster side for its own purpose.

PAF mostly use temporary and private attributes (stored in the cluster side as well). The only visible attribute is the master score:

Any other master score means the node is not streaming from the master yet.

I'm not sure we could expose some more information in crm_mon without setting useless attributes and being annoying with the cluster stack with no reasons.

The best I could imagine would be to parse the log file looking for pgsqlms entries or requesting PostgreSQL itself...

You can find useful requests in pgsqlms or check_pgactivity code.

StephenSorriaux commented 6 years ago

Thank you a lot for your feedback. Do you thing that is something that can be worth implementing?

ioguix commented 6 years ago

No, I don't think that is something worth implementing in PAF, it would add useless cluster event and communication.

In my opinion, this kind of information should be on the metrology/monitoring/cli side if required.