# Monitoring Wait Stats

> Source chapter 3.6 for PostgreSQL 9.6.

---

LLMS index: [llms.txt](/en/llms.txt)

---

<div class="feature-source-note"><span class="feature-edition-badge">Beta 1</span><span><strong>Source pages:</strong> PDF 45</span><span><a href="https://github.com/nori-shinoda/documents/blob/1773200c5362476c4a549222b7d17fa91f546cae/postgresql96_beta1_new_features_en_20160606-1.pdf">Original PDF on GitHub</a></span></div>

<p class="feature-page-marker" id="pgfeat-9-6-monitoring-pdf-page-45">PDF page 45</p>

The information of the wait events that are occurring in the PostgreSQL instance can be get now. Waiting column is deleted from pg_stat_activity catalog, wait_event_type columns and wait_event column are added. The wait_event_type column contains the following values.

**Table 26.** The value of wait\_event\_type column

| Columns value | Description |
| --- | --- |
| LWLockNamed | Waiting by a particular lightweight lock |
| LWLockTranche | Waiting by the lightweight lock for the group |
| Lock | Waiting by weight lock (LOCK TABLE statement etc) |
| BufferPin | PIN waiting for the buffer |

Please refer to the following URL for more information. [http://www.postgresql.org/docs/9.6/static/monitoring-stats.html](http://www.postgresql.org/docs/9.6/static/monitoring-stats.html)

**Example 40.** Waiting by two LOCK TABLE IN EXCLUSIVE statements

```text
postgres=> SELECT pid, wait_event_type, wait_event
FROM pg_stat_activity WHERE pid=4070 ;
 pid  | wait_event_type | wait_event
------+-----------------+------------
 4070 | Lock            | relation
(1 row)
```

**Example 41.** Waiting by SELECT FOR UPDATE statement and UPDATE statement

```text
postgres=> SELECT pid, wait_event_type, wait_event
FROM pg_stat_activity WHERE pid=4070 ;
pid   | wait_event_type |  wait_event
------+-----------------+---------------
 4070 | Lock            | transactionid
 (1 row)
```
