pgpool-II 3.6.28 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 4. Server Setup and Operation | Next |
pgpool.conf is the main configuration file of Pgpool-II. You need to specify the path to the file when starting Pgpool-II using -f option. pgpool.conf is located at $prefix/etc/pgpool.conf by default.
There are four different running modes in Pgpool-II: streaming replication mode, master slave mode, native replication mode and raw mode. In any mode, Pgpool-II provides connection pooling, and automatic fail over. Online recovery can be used only with streaming replication mode and native replication mode. The sample configuration files for each mode are provided. They are located under $prefix/etc. You can copy one of them to $prefix/etc/pgpool.conf.
Those modes are exclusive each other and cannot be changed after starting the server. You should make a decision which to use in the early stage of designing the system. If you are not sure, it is recommended to use the streaming replication mode.
The streaming replication mode can be used with PostgreSQL servers operating streaming replication. In this mode, PostgreSQL is responsible for synchronizing databases. This mode is widely used and most recommended way to use Pgpool-II. Load balancing is possible in the mode. The sample configuration file is $prefix/etc/pgpool.conf.sample-stream.
The master slave mode mode can be used with PostgreSQL servers operating Slony. In this mode, Slony/PostgreSQL is responsible for synchronizing databases. Since Slony is being obsoleted by streaming replication, we do not recommend to use this mode unless you have specific reason to use Slony. Load balancing is possible in the Load balancing is possible in the mode. The sample configuration file $prefix/etc/pgpool.conf.sample-replication.
In the raw mode, Pgpool-II does not care about the database synchronization. It's user's responsibility to make the whole system does a meaningful thing. Load balancing is not possible in the mode. The sample configuration file $prefix/etc/pgpool.conf.sample.