Re: Patroni configuration issue - Mailing list pgsql-admin

From Vijaykumar Jain
Subject Re: Patroni configuration issue
Date
Msg-id CAM+6J94kdFHbFDbfXepaG7bTY6CnSwyFZMpWwuzSfLW9WD7L2Q@mail.gmail.com
Whole thread Raw
In response to Re: Patroni configuration issue  (Vijaykumar Jain <vijaykumarjain.github@gmail.com>)
List pgsql-admin

On Tue, 6 Jul 2021 at 03:37, Vijaykumar Jain <vijaykumarjain.github@gmail.com> wrote:
I may be wrong in my simulation (my first time), but in that case you will have to describe how did you setup your cluster, did you use any reference etc?
maybe that might help me understand this more.


just following up on this, I was new to etcd and installed v3.5.x and was not sure how to list all keys etc,
turns out, I had to set ETCDCTL_API=2, and use the old version commands to list and del key. 

export ETCDCTL_API=2 # ls does not work on v3
alias ee='etcdctl --endpoints=http://127.0.0.1:2379 '

# i used default namespace and cluster name, so
postgres@db:~/patroni_demo$ ee ls  --recursive /
/service
/service/batman
/service/batman/members
/service/batman/members/postgresql0
/service/batman/members/postgresql1
/service/batman/initialize   --- this is the key we need to delete to reinit the db
/service/batman/config
/service/batman/leader
/service/batman/optime
/service/batman/optime/leader

postgres@db:~/patroni_demo$ ee get /service/batman/initialize
6981912157875070537

# solve i am not leader, server not starting up
ee rm /service/batman/initialize
PrevNode.Value: 6981912157875070537

and then run patroni <config> again as a fresh setup, and you get your leaders and replica just fine.


pgsql-admin by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Archive cleanup
Next
From: Jeff Janes
Date:
Subject: Re: WALWriteLock