[ClusterLabs] PAF with postgresql 13?
CHAMPAGNE Julie
julie.champagne at pm.gouv.fr
Tue Mar 8 03:00:22 EST 2022
Hello,
I've created the ressource pgsqld as follow (don't think the cluster creation command is necessary):
pcs resource create pgsqld ocf:heartbeat:pgsqlms promotable \
PGDATA=/var/lib/postgresql/13/main \
bindir=/usr/lib/postgresql/13/bin \
start_opts="-c config_file=/var/lib/postgresql/13/main/postgresql.conf" \
op start timeout=60s \
op stop timeout=60s \
op promote timeout=30s \
op demote timeout=120s \
op monitor interval=15s timeout=10s role="Master" meta master-max=1 \
op monitor interval=16s timeout=10s role="Slave" \
op notify timeout=60s meta notify=true
BTW, I had to edit the file /usr/lib/ocf/resource.d/heartbeat/pgsqlms because the default values of bindir, pgdata didn't match the Debian/postgresql default settings:
# Default parameters values
my $system_user_default = "postgres";
my $bindir_default = "/usr/lib/postgresql/13/bin";
my $pgdata_default = "/var/lib/postgresql/13/main";
Thanks !
-----Message d'origine-----
De : Jehan-Guillaume de Rorthais <jgdr at dalibo.com>
Envoyé : lundi 7 mars 2022 22:51
À : CHAMPAGNE Julie <julie.champagne at pm.gouv.fr>
Cc : Cluster Labs - All topics related to open-source clustering welcomed <users at clusterlabs.org>
Objet : Re: [ClusterLabs] PAF with postgresql 13?
On Mon, 7 Mar 2022 14:49:35 +0000
CHAMPAGNE Julie <julie.champagne at pm.gouv.fr> wrote:
> The return gives nothing for the first command.
> Then:
>
> name="test-debug" host="node1" value="testvalue" for node1.
>
> After executing both commands on node2, it gives me the following
> return on both server:
>
> name="test-debug" host="node2" value="testvalue"
> name="test-debug" host="node1" value="testvalue"
Well, everything sounds fine.
There was a bug in Pacemaker 2.1 few weeks/months ago that has been fixed quickly. I was wondering if there was some trouble with 2.0 around the same issue, but it doesn't.
I don't understand why the "lsn_location" is empty here. It should have been set during the pre-promote actions...
... wait, now I think about notify actions, it looks like you set "notify=true"
on "pgsqld", not on "pgsqld-clone"? Quoting your previous email, I can see multiple errors:
============================================================================
...
Resources:
Clone: pgsqld-clone
Meta Attrs: PGDATA=/var/lib/postgresql/13/main
bindir=/usr/lib/postgresql/13/bin promotable=true start_opts="-c
config_file=/var/lib/postgresql/13/main/postgresql.conf"
Resource: pgsqld (class=ocf provider=heartbeat type=pgsqlms)
Meta Attrs: master-max=1 notify=true
...
============================================================================
1. the parameter is pgdata, not "PGDATA"
2. "pgdata", "bindir", "start_opts" are not meta attributes, they are simple
attributes
3. "master-max=1" and "notify=true" are not supposed to be meta attributes of
"pgsqld", but meta attributes of "pgsqld-clone".
Could you share the command used to setup this cluster? There's something wrong with them.
I am surprised pgsqlms did not error'ed with this setup...
Regards,
More information about the Users
mailing list