PostgreSQL Streaming Replication with pgpool-II Part3

Government | Commercial

KNOWLEDGE BASE

PostgreSQL 9.0 Streaming replication setting with pgpool-II Part3

Installing pgpoolAdmin Part3

pgpoolAdmin is a management tool for pgpool-II written in PHP. pgpoolAdmin must be executed on the same host which pgpool-II is running on. This effectively means that pgpoolAdmin does not work on Windows platform. pgpoolAdmin runs on PHP 4.2 or higher. It also needs PostgreSQL extension. If you plan to build PHP, please include –with-pgsql option. If you plan to install PHP from rpm. you may need to install PostgreSQL extension as well. Some distributions have built-in support for PostgreSQL extension, but most distributions do not.

pgpoolAdmin has its own installer thus it is pretty easy to install pgpoolAdmin. In this configuration you need to install to-be-released-as-3.0.2 version of pgpoolAdmin. to-be-released-as-3.0.2 version of pgpoolAdmin Unpack it under Apache document directory (for example, /var/www/html/). Follow the install instructions, located at doc/install/install.html. Here are several key points before installing pgpoolAdmin by using Web installer.

# cd /var/www/html/pgpoolAdmin-3.0.2 
# chmod 777 templates_c 
# chown apache conf/pgmgt.conf.php 
# chmod 644 conf/pgmgt.conf.php 

Once you are prepared, brows the pgpoolAdmin install using your favorite Web browser. In this example, the URL will be similar to http://localhost/pgpoolAdmin-3.0.2/install/index.php. You will see the Welcome Page Click “Next” on the next page it will be confirm that the pgAdmin too page was successfully installed. Please make sure that all items are checked by green. This indicates that everything is good. Click “Next”. This is the main setting page. Several points you want to change from default values:

  • Check “don’t run in daemon mode”. This is neccessary to get pgpool log
  • Chose stop mode “fast”. The default value “smart” will not allow you to stop pgpool until all clients are disconnected and I feel this is annoying for test envrionment
  • Set “pgpool Logfile” to “|/usr/sbin/rotatelogs2 -l -f /var/log/pgpool/pgpool.log.%A 86400”. This allows to place pgpool log files under /var/log/pgpool/ and rotate them once a day by using rotatelogs2 coming with apache2
  • Set “Refresh Time” to 10. PgpoolAdmin will check pgpool-II status every 10 seconds and refresh pages. This is extremely convenient for test environments

Once you’ve done, the page should look like this pgPoolSuccesFinal You finished to install pgpoolAdmin. Congratulations!

Next, we will be doing part 4: Starting pgpool-II Part 4