O'Reilly logo

PostgreSQL High Availability Cookbook - Second Edition by Shaun M. Thomas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

As with all good recipes, we begin with the primary ingredients. Projects written with Python commonly include a file named setup.py that manages installation-related activity. If we invoke that script with the install parameter, Patroni gets installed as a generally available system package with associated command-line tools. We're particularly interested in the patroni and patronictl utilities.

We're not particularly sure why this is the case, but many of the libraries installed by Patroni are only readable by the root user. In order to fix this, we start by setting the FIXDIR environment variable to the probable location of the libraries. Next we use chmod to make all of the files readable, and finish with a find command ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required