►
From YouTube: Patroni 2020-04-09
Description
Patroni is a cluster manager used to customize and automate deployment and maintenance of PostgreSQL HA (High Availability) clusters
A
As
I
said,
this
is
a
still
work
in
progress,
but
we're
going
to
use
it,
and
hopefully
we
can
integrate
it
with
the
next
release
off
good,
laugh
and
make
it
available
to
everyone
that
wants
to
opt
in,
for
it.
Users
can
still
use
rep
rep
manager,
but
this
is
an
opt-in
solution
and
if
you
choose
to
use
Patroni
for
now,
you
either
have
to
choose
Patroni
or
a
manager
you
can
have,
and
we
haven't
tested
the
switch
over
between
these
two.
A
A
A
A
First,
its
installed
the
it
lab
and
it
fetches
it
from
the
mr
at
the
moment,
because
it's
not
publicly
available
it's
an
artifact
that
is
built
and
in
the
pipeline
of
the
NMR
and
then
it
starts
configuring.
The
node
sets
up
get
lab
our
BT
preferred
values
and
then
browse
the
post
installation.
So
let's
take
a
look
quickly
at
these
scripts
while
it
is
deploying
so
this
is
the
installer
script,
nothing
especially
all
about
it.
You
can.
A
Download
and
install
that
the
configure
part
is
a
bit
different,
so
we
have
to
configuration
nodes,
one
for
application
and
the
other
one
for
database.
So
this
is
the
amount
of
complication
that
is
needed
for
database,
and
this
is
for
application
and
that's
it
for
now.
I
disable
running
reconfigure
and
I
will
I
want
to
do
it
manually
after
going
through
some
of
the
checks
and
after
configuration
afternoon
just
runs
the
next
step
that
is
needed
for
starting
the
clock,
the
application,
the
rails
application,
which
is
well
in
our
documentation.
A
B
C
D
D
A
B
D
A
A
A
The
same
configuration
is
used
on
all
the
nodes,
so
there
is
no
difference
between
master
and
the
leader
and
the
replica.
As
a
matter
of
fact,
we
don't
know
which
one
of
these
are
going
to
be
the
replicas
or
the
master,
because
it
will
be
decided
it.
It
depends
when
which
one
of
them
big
acquires
a
lot
and
can
be
distractor.
A
A
A
A
So
if
you
have
a
running
running
console
cluster,
if
you
put
a
strap
one
note,
if
you
enable
Patroni
on
one
node,
that
node
by
default
becomes
the
master,
so
the
first
one
that
is
enabled
becomes
the
master
and
every
of
everyone
else
becomes
the
follower.
But
if
you
don't
have
the
console
cluster
it,
you
can't
really
say
which
one
becomes
the
the
first
one.
A
C
And
if
I
guess,
what
what's
the
implication
for
a
cluster
administrator
that
they
they
can't
necessarily
like
if
they're
not
aware
of
that
or
they
don't
like,
we
don't
know
the
data
backup
if
it
changes
it
ball
scales
over.
What
are
we
like?
How
are
we
handling
their
backups
of
situation?
You
know
we
have
a
database
backup.
You
know
you
need
you
control,
but
customers
also
just
backup
the
cord
data
path
like
the
the
file
path.
You
know
the
where
the
postcards
bar
data
lives.
A
D
D
You
want
to
make
a
backup
of
the
master
and
see
your
back.
Your
backup
solution
is
only
backing
up
the
master.
You
have
to
ask
in
this
case
Patroni
what
the
who
the
master
is
before
you
do,
your
backup,
that's
that's
the
same
with
ret
manager
at
the
moment
as
well.
If
you
need
to
specifically
grab
the
the
master,
you
need
to
ask
rep
manager,
which
one
is
the
master.
E
A
A
Which
at
the
moment
only
supports
two
command
to
stop
commands
actually
su
sub
subt
commands?
One
of
them
is
checked
leader
and
the
other
two
check
check
replicas
and
the
reason
that
we
don't
I
don't
have.
We
don't
have
the
another
one,
because
this
is
this
is
what
I
mean
another
mode
is
descriptive.
Descriptive
want
to
tell
you
which
one
is
the
leader.
Is
it
it's
not
already
implemented,
it
can
be
implemented
easily.
You
can
ask
who
is
the
leader,
but
the
thing
is
this:
one
is
used
by
consul
to
just
monitor,
be
the
cluster.
C
A
Because
when
we
started
it,
Napa
country,
we
didn't
have
a
running
consul
cluster.
So
as
soon
as
consul
cluster
came
up,
one
of
them
grabbed
the
lock
and
managed
to
to
strap
itself
and
mark
itself
as
the
leader
and
the
wrist
became
the
follower
by
default.
If
I
had
a
running
consul,
cluster
and
I
input
a
strap,
the
first
one,
the
first
one
could
do
that
earlier.
But
since
we
did
it
almost
simultaneously
without
having
it
consul
cluster,
it
really
depended
on
which
one
and
when
the
Consul
cluster
became
available,
I.
C
Guess
it's
more
of
a
question
of
this
I'm
looking
at
this
from
the
standpoint
of
the
orchestrator,
so
cluster
comes
up,
I
have
to
login
to
every
database,
node
and
and
grep
for
the
one
that
says:
I
am
the
leader
I
can't
there's
no
way
for
me
to
say:
hey
cluster,
who
is
your
blue?
Your
primary
know:
I
can
I.
A
A
A
That's
one
step
that
you
need
to
take
query
the
console
Patroni,
who
is
the
leader
and
it
will
tell
you
which
one
and
then
you
can
go
and
run
the
backup
against
the
leader
that
is
identified
by
Patroni,
but
I
think
is
if
you
want
to
do
a
backup
at
that
point,
you
need
also
to
check
before
running
your
backup.
You
need
to
check
it.
Is
it
still
leader.
A
A
A
A
C
B
A
A
A
A
D
A
Sometimes
it
happens.
One
thing
that
I
notice
is
that
when,
if
the
it
lab
reconfigure
fails,
if
the
reconfigure
command
films,
it
doesn't
right
the
public
attributes
file,
and
then
it
doesn't
do
that
the
PG,
be
not
you
fine
doesn't
work,
so
you
will
have
to
reconfigure
again
fix
the
error.
We
can't
figure
again
make
sure
that
the
public
attributes
are
written
and
then
restart
console
console
needs
a
kick
again
to
rewrite
e.
C
A
C
Yep,
that's
one
of
the
things
with
the
H,
a
the
orchestrator
supposed
to
help
with
some
of
these
things
that
are
like
the
all
of
those
can't
be
aware
of
each
other.
So
getting
that
done
and
then
kicking
it
again
to
make
sure
it
works.
If
that's
why
it's
kind
of
extra
layer
above
so
we
should
hopefully
have
some
insulation
around
this,
the
sharp
edge
here
it
been
so
okay.
B
D
B
A
A
A
Looks
like
the
first
one,
the
first
one
was.
The
first
error
message
was:
is
one
because
I
ran
into
it
before
this
means
that
the
public
attributes
is
not
available,
get
public
attributes
returns
null
or
sorry
empty.
A
A
B
D
A
E
E
A
E
A
A
E
C
D
D
A
B
B
B
B
B
B
A
This
is
the
this
I
think
this
is
the
most
controversial
one.
There
is
no
PostgreSQL
anymore,
it
is
own,
it
is
managed
by
Patroni.
So
if
you
just
want
to
restart
your
possible
school,
if
you
want
to
kill
it,
if
you
want
to
do
anything
to
your
post-classical
instance
in
the
cluster,
you
just
need
to
do
it
with
that.
One.
A
A
B
D
C
A
D
A
A
D
A
A
A
A
At
this
point,
it
is
ready
for
initial
review
because
all
the
pieces
that
are
working
out
there,
but
there
are
room
for
improvement
and
enhancement,
certainly
missing
test
cases
is
a
problem
for
for
the
final
review.
I
didn't
write
any
test
case
I
just
kept
building
it
to
make
it
sure
that
it's
working
good,
to
be
honest
with
you
up
until
yesterday
afternoon,
which
is
I,
am
early-morning
right
now
it
wasn't
working
so.
A
Right
now,
it
can
be
reviewed,
it's
ready
for
an
issue,
but
during
the
review
I
think
it
gives
me
some
time
to
improve
the
some
of
the
pieces
that
I
don't
like
still
for
configuration.
For
example,
Patroni
configuration
structure
is
not
I,
don't
think
it's
it's
good,
an
SSL
as
well.
This
always
needed
to
be
there.
D
Yes,
that's
good
yeah,
if,
if
you
think
it's
ready
for
for
people
to
start
taking
a
look
at
to
provide
feedback
on
the
approach
yeah,
please
ping,
the
distribution
team,
joint
I
would
love
to
take
a
look
at
it
for
sure
I'm
out
tomorrow,
though,
but
you
know
Ian
involving
might
want
to
be
digging
into
it
as
well.
Yeah.