[ClusterLabs] Resource Agents: pgsql vs. pgsqlms

Jehan-Guillaume de Rorthais jgdr at dalibo.com
Thu Jul 11 13:22:31 UTC 2024


On Thu, 11 Jul 2024 14:12:27 +0200
Ede Wolf <listac at nebelschwaden.de> wrote:

> Just let me take this mail as a placeholder to thank you all very much 
> for your rather fast replies!

You are very welcome.

> Just wondering, besides implementation and documentation, is there an 
> overview of features / percieved advantages of one over the other?

Not that I am aware of.

My personal percieved advantages of pgsqlms over pgsql are:

* easier to setup
* lower maintenance complexity
* easy and automated switchover
* try hard to avoid race conditions during failover

But pay attention on the fact that as the author of PAF, I'm highly biased, and
it's been ages since I had my hands on a cluster using the "pgsql" resource
agent. I don't really paid attention on how it evolved in the past 9 years.

> One is, the older ra is somewhat more timeproven,

PAF is around since 8 years now. Even more if we add it's cocoon/larva's life.

> the other the language. Bash is realistic to read, perl probably not.

That's really a matter of taste, and you might be surprised:

 https://github.com/ClusterLabs/resource-agents/blob/main/heartbeat/pgsql
 https://github.com/ClusterLabs/PAF/blob/master/script/pgsqlms

However, pgsqlms's larva was actually written in bash. Look at this FAQ entry
about PAF and perl history:

https://clusterlabs.github.io/PAF/FAQ.html#why-perl

Mind you, the "pgsql" resource agent actually use perl in its
"get_pgsql_param()" function…

> Since both documentations seem to not to be up to date, using those as a 
> baseline may not be the most useful for a comparison. Now, if that's all 
> there is, then be it.

Well PAF's doc hasn't been updated since few years, however its parameters
didn't changed! 

The quickstart guides and cookbooks should really be updated to the latest OS
and applications versions to include changes from Pacemaker, pcs, Debian or EL,
PostgreSQL, etc. But as far as you are confortable with OS and Pacemaker, this
shouldn't be a challenge to you.

> Since this does not free us from actually testing both in a lab. But as 
> we are rather new to this as well, we might not initally have the 
> knowledge to evaluate both to its fullest.

Too bad I hadn't update the vagrant PoC for a while, but you can have a look
in the following vagrant envs, if they still work with "modern" ansible/libvirt:

https://github.com/ClusterLabs/PAF/tree/master/extra/vagrant

If they doesn't work anymore, at least, you can scrap some useful comments,
commands & configs from there as well.

Maybe I'll do an ansible/terraform version at some point…

++


More information about the Users mailing list