Configuring and Using Pivotal Postgres
pgBackrest, an open source backup and restore solution for PostgreSQL, is included with Pivotal Postgres. You can configure PostgreSQL and
pgBackRest to set up backup and restore for your Postgres clusters.
Install pgBackRest Perl prerequisites.
$ sudo yum install perl perl-Time-HiRes perl-Digest-SHA perl-JSON-PP
Create pgBackRest configuration directories and files.
$ sudo mkdir -p /etc/pgbackrest $ sudo mkdir -p /etc/pgbackrest/conf.d $ sudo touch /etc/pgbackrest/pgbackrest.conf $ sudo chmod 640 /etc/pgbackrest/pgbackrest.conf $ sudo chown postgres:postgres /etc/pgbackrest/pgbackrest.conf
Check that pgBackRest is properly installed.
$ sudo -u postgres pgbackrest
You will see errors if any dependencies are missing.
See the pgBackRest User Guide for help configuring Postgres and pgBackRest, and for backing up and restoring your Postgres clusters.
Pivotal Postgres includes Patroni, a high availability solution for PostgreSQL.
To use Patroni on Red Hat, you must install Python 3 and the Python packages Patroni requires.
Install Python 3.
$ yum install -y python3 python3-devel gcc
Create a requirements file for Python packages needed by Patroni.
$ cat << EOF > requirements.txt urllib3>=1.19.1,!=1.21 boto PyYAML requests six >= 1.7 kazoo>=1.3.1 python-etcd>=0.4.3,<0.5 python-consul>=0.7.0 click>=4.1 prettytable>=0.7 tzlocal python-dateutil psutil>=2.0.0 cdiff kubernetes>=2.0.0,<=7.0.0,!=4.0.*,!=5.0.* EOF
pip3with the requirements file you created as input.
$ pip3 install -r requirements.txt
Patroni works with a Distributed Configuration System (DCS) to coordinate multiple Postgres instances, for example,
consul. See the Patroni Documentation for steps to set up and configure Patroni with your chosen DCS.
You configure psqlODBC by placing settings into a configuration file,
odbc.ini, and then using an ODBC driver manager such as UnixODBC or iODBC to load the configuration file. See 7.3. Configuration Files in the PostgreSQL documentation for information about the ODBC driver configuration settings.
See also psqlODBC - PostgreSQL ODBC driver for additional HOWTOs and release-specific information associated with the driver software.
In order to use the
pgjdbc driver from a Java application, you must include the driver software in your CLASSPATH as described in Setting up the Class Path. See also the full documentation at The PostgreSQL JDBC Interface for information about initializing and using the JDBC driver in your Java applications.