PostgreSQL Databases Test

For each database on the PostgreSQL server, this test reports the transaction load on the database and reveals how well the database processes the transaction requests to it and how well it utilizes its cache. Overload conditions and processing bottlenecks are thus revealed.

Target of the test : PostgreSQL server

Agent deploying the test: An internal/remote agent

Outputs of the test : One set of results for every database on the target PostgreSQL server

Configurable parameters for the test
Parameter Description

Test period

How often should the test be executed

Host

The IP address of the host for which this test is to be configured.

Port

The port on which the server is listening. The default port is 5432.

Username

In order to monitor a PostgreSQL server, you need to manually create a special database user account in every PostgreSQL database instance that requires monitoring. When doing so, ensure that this user is vested with the superuser privileges. The sample script we recommend for user creation for eG monitoring is:

CREATE ROLE eguser LOGIN

ENCRYPTED PASSWORD {‘eguser password’}

SUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;

GRANT CONNECT ON DATABASE "<DB_NAME>" TO <USER_NAME>;

Specify the name of this user in the Username text box.

Password

The password associated with the above Username (can be ‘NULL’). Here, ‘NULL’ means that the user does not have any password.

Confirm Password

Confirm the Password (if any) by retyping it here.

DB Name

The name of the database to connect to. The default is “postgres”.

Exclude DB

Specify a comma-separated list of databases that need to be excluded from monitoring in the Exclude DB text box. By default, this is set to rdsadmin.

Note:

If you are monitoring a PostgreSQL server hosted on AWS cloud, then make sure that you do not remove 'rdsadmin' from the Exclude DB list.

SSL

If the PostgreSQL server being monitored is an SSL-enabled server, then set the SSL flag to Yes. If not, then set the SSL flag to No.

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Database size:

Indicates the current size of this database.

KB

 

Cache hit ratio:

Indicates the percentage of requests to this  database that were serviced by the cache, without having to read from disk.

Percent

Because reading from the cache is less expensive than reading from disk, you want the ratio to be high. The higher this value is, the better. Generally, you can increase the cache hit ratio by increasing the amount of memory available to the database server.

The detailed diagnosis of this measure provides you with the complete details of the database such as the number of server processes running on it, the number of transactions committed and rolled back, and the number of rows inserted, updated, and deleted.

Commit ratio:

Indicates the rate at which live rows are fetched while this index is scanned.

Percent

 

Server process:

Indicates the number of processes that are currently running on this database.

Number

 

Inserts:

Indicates the rate at which the records are inserted into this database.

Inserts/Sec

 

Deletes:

Indicates the rate at which the records are deleted from this database.

Deletes/Sec

 

Updates:

Indicates the rate at which records are updated into this database.

Updates/Sec

 

Commits:

Indicates the transaction throughput.

Commits/Sec

A decrease in this measure during the monitoring period may indicate that the applications are not doing frequent commits. This may lead to problems with logging and data concurrency.

The cause has to be probed in the application.

Rollbacks:

Indicates the rate at which rollbacks occurred on this database.

Rollbacks/Sec

A high rollback rate is an indicator of bad performance, since work performed up to the rollback point is wasted. The cause of the rollbacks has to be probed in the application.

Rows fetched:

Indicates the rate at which the rows that were read from this database based on a user query are stored in the buffer.

Fetches/Sec

 

Rows returned:

Indicates the rate at which the rows are fetched from the buffer and sent to the client application.

Returns/Sec

If the size of the rows that are fetched from the buffer is too large, then the rows are fragmented and transferred to the client which is time consuming. This may in turn affect the performance of the database to some extent.

Blocks read:

Indicates the rate at which the blocks are read from this database.

Fetches/Sec

 

Block hits:

Indicates the rate at which the blocks are fetched after a read is performed in this database.

Hits/Sec