O'Reilly logo

PostgreSQL Cookbook by Chitij Chauhan

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

Configuring pgpool and testing the setup

In this recipe, we are going to configure pgpool and show how to make connections.

Getting ready

Before running pgpool, if you are downloading the source tarball, then the pgpool software needs to be built and compiled. These steps are shown in the first recipe of this chapter.

Also, we will be testing for replication using pgpool. For this purpose, we are setting up two data directories on the same server. They will act as two nodes.

Assuming that the default data directory, /var/lib/pgsql/9.3/data, which will serve as node 0, has already been set up, we will now set up another data directory that will serve as node 1:

initdb -D /var/lib/pgsql/9.3/data1

Once the data directory has been set up, the next step ...

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