RHQ, the common services project for infrastructure management

  Dashboard > RHQ-Project > ... > Installing > PostgreSQL Preparation
  RHQ-Project Log In | Sign Up   View a printable version of the current page.  
  PostgreSQL Preparation
Added by John Mazzitelli , last edited by John Mazzitelli on Mar 31, 2008  (view change)
Labels: 
(None)

PostgreSQL Preparation

PostgreSQL version

RHQ currently supports versions 8.2.4 through 8.2.6 of PostgreSQL.
Earlier versions are not recommended.

If you do not have PostgreSQL installed already, please see our PostgreSQL Quick Start Installation Guide for some simple steps to get you installed with PostgreSQL quickly.

RHQ's usage of PostgreSQL requires a few changes to the database configuration. Edit the postgresql.conf file and change or add the following:

postgresql.conf
## performance changes for RHQ
shared_buffers = 10000
work_mem = 2048
statement_timeout = 30000
checkpoint_segments = 10
max_fsm_pages = 100000

See http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html for information on setting up remote access to your PostgreSQL if you have the database server on a different box than your RHQ Server.

RHQ will use up to 110 database connections for the server. PostgreSQL also allows for connections reserved for administrators. Those connections are counted in the pool of max_connections, so they need to be added to the total number of max_connections. Assuming we have 5 connections reserved for the administrator, then change this in the postgresql.conf file as follows:

postgresql.conf continued
max_connections = 115
superuser_reserved_connections = 5

If you are using the PostgreSQL RHQ agent plugin to monitor this database instance, add one more connection per (logical) database you have in PostgreSQL - this extra connection will allow the agent to periodically probe the database.

Additionally, depending on the OS you are using, you may need to adjust some kernel parameters as described here.

You will need to create a role that RHQ will use to connect to PostgreSQL. For more details of how to do that, see here.

Finally you'll need to update the pg_hba.conf file to allow the role you just created to connect from the machine the RHQ Server will be installed on, e.g. localhost. For more details on how to do that, see here.

Restart PostgreSQL, so the changes take effect. The database is now ready to support a RHQ installation.

Powered by a free Atlassian Confluence Open Source Project License granted to Hyperic HQ. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators