46.2. Wait Event Statistics #
PPEM supports integration with the pg_wait_sampling extension for viewing the wait history and profile in user sessions.
46.2.1. Viewing Statistics on Wait Events #
Before performing this instruction, install the pg_wait_sampling extension.
To view statistics on wait events:
Go to user sessions in one of the following ways:
Using the monitoring section:
In the navigation panel, go to Monitoring → Activity.
In the top-right corner of the page, select the instance.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Activity.
In pid, click the backend ID of the user session.
The Wait events profile page with the following web application interface elements will be displayed:
The Session tile with the following parameters of the selected user session:
Duration: The duration of the user session.
Active transaction: The duration of the current transaction in the user session.
Active request: The duration of the current query in the user session.
Total time spent waiting: The total duration of wait events in the user session.
Observations: The number of sampled wait events in the user session.
Unique events: The number of unique wait events sampled in the user session.
The Sampling settings tile with the following wait profile configuration parameters:
profile_period (corresponds to
pg_wait_sampling.profile_period)profile_pid (corresponds to
pg_wait_sampling.profile_pid)profile_queries (corresponds to
pg_wait_sampling.profile_queries)sample_cpu (corresponds to
pg_wait_sampling.sample_cpu)
For the description of these configuration parameters, refer to the official Postgres Pro documentation. If required, you can edit wait profile configuration parameters.
The graph with statistics on wait events. You can perform the following actions with this graph:
To scale up or down, use the slider at the bottom of the graph.
To view detailed information about wait events, hover over the graph.
The History tile with the following wait history parameters:
Duration: The duration of the wait history.
Start and End: The start and end date and time of the wait history.
The History settings tile with the following wait history configuration parameters:
history_size (corresponds to
pg_wait_sampling.history_size)history_period (corresponds to
pg_wait_sampling.history_period)
For the description of these configuration parameters, refer to the official Postgres Pro documentation. If required, you can edit wait history configuration parameters.
The table of events with the following columns:
Time: The date and time of the event.
Standby event type: The type of the wait event associated with the event.
For more information about possible values, refer to the official Postgres Pro documentation.
Standby event: The wait event associated with the event.
Query id: The unique ID of the query associated with the event.
Query: The text of the query associated with the event.
To view the query text separately, click
next to it.
46.2.2. Editing Wait Profile and History Configuration Parameters #
Go to user sessions in one of the following ways:
Using the monitoring section:
In the navigation panel, go to Monitoring → Activity.
In the top-right corner of the page, select the instance.
Using the configuration section of an instance:
In the navigation panel, go to Infrastructure → Instances.
Click the name of the instance.
In the navigation panel, go to Activity.
In pid, click the backend ID of the user session.
In the top-right corner of the page, click Edit parameters.
Edit wait profile and history configuration parameters.
Click Save.