9.3.2

Table Of Contents
Viewing Performance Statistics
You can obtain vFabric Postgres performance statistics using Pgstatpack. Pgstatpack takes snapshots of
various system values, and compares the differences between snapshots, letting you evaluate and tune your
database's performance.
Pgstatpack lets you collect, automate, store, and view vFabric Postgres performance data. Pgstatpack stores
the performance statistics permanently in database tables, which you can later use for reporting and
analysis. The data collected can be analyzed using Pgstatpack reports, which include an instance health and
load summary page, high resource SQL statements, and the traditional wait events and initialization
parameters.
Pgstatpack creates snapshots of system information available in the system view for statistics named
pg_stat_*, and stores the data from a snapshot in the designated table. To perform an analysis of the
database's performance, the collected data from two snapshots are compared and their differences
computed. You can use this information in determining appropriate performance tuning metrics for your
vFabric Postgres database.
1 Enable Pgstatpack on page 36
You must enable the Pgstatpack extension to view performance statistics.
2 Create a Pgstatpack Snapshot on page 36
You create snapshots of system performance at given points in time. You then compare snapshots to
evaluate system performance.
3 Generating vFabric Postgres Performance Reports on page 37
You generate Pgsnapstat performance reports from the snapshots you create.
Enable Pgstatpack
You must enable the Pgstatpack extension to view performance statistics.
Prerequisites
n
Connect to the vFabric Postgres GUI so that you can enter and run SQL commands. See “Enter and Run
a SQL Query,” on page 45.
n
You must have permissions to create tables, functions, and sequences in order to use Pgstatpack.
Procedure
u
To enable Pgstatpack, execute the SQL statement CREATE EXTENSION pgstatspack;.
CREATE EXTENSION pgstatspack;
Create a Pgstatpack Snapshot
You create snapshots of system performance at given points in time. You then compare snapshots to
evaluate system performance.
Snapshots are created by returning a result set of records from the pgstatspack_create_snap table.
You create snapshots at different time intervals that you compare to evaluate system performance. To
manage the creation of snapshots at fixed times, dates, or intervals, use your operating system's cron utility,
a time-based job scheduler. Taking snapshots at fifteen minute intervals is generally considered a good
practice, but you can adjust this to be a longer or shorter interval depending on the activity of your
vFabric Postgres deployment.
Using VMware vFabric Postgres
36 VMware, Inc.