# Transaction Wraparound Report(Postgres)

Transaction wraparound is a significant challenge in PostgreSQL, and this new feature is designed to help analyze and predict it. For a given database, it provides the percentage progress toward wraparound and identifies potential issues such as idle transactions, inactive replication slots, and other factors that may be hindering the freezing process

Demo video <https://youtu.be/eDe4eMtHUMk>

**HTML Report (Sample)**

<figure><img src="https://3013412235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj94nGPKUS9dlzKveRYHc%2Fuploads%2FGjQiN84p5BJ33QWkH25r%2Fimage.png?alt=media&#x26;token=5f8d269a-9761-457d-8f57-ba06231ec340" alt=""><figcaption></figcaption></figure>

**Identifying the problem database**

Once you identify that this issue is occurring, you'll likely want to know which database is responsible. The table below in the report highlights the top 5 databases contributing to the problem

<figure><img src="https://3013412235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj94nGPKUS9dlzKveRYHc%2Fuploads%2FahkqntJ5HMgqDtqSgMlY%2Fimage.png?alt=media&#x26;token=fe5aeb67-5e4a-475f-a81b-f9359e189f40" alt=""><figcaption></figcaption></figure>

**Transactions Per Seconds Vs Time to hit wraparound point (Reference table)**

The reference table below provides an estimate of the time required to exhaust 2 billion transactions.

**Note:** Calculate your transactions per second (TPS) during peak workload periods and compare it with the table. Additionally, identify any factors that might be hindering freezing activity

<figure><img src="https://3013412235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj94nGPKUS9dlzKveRYHc%2Fuploads%2F7fW69FwXSM6uV3GaytRj%2Fimage.png?alt=media&#x26;token=ae7276ff-595e-4074-b205-5b7df7237e71" alt=""><figcaption></figcaption></figure>

**Wraparound Stats**

Below report helps you identify potential issues like idle transactions, inactive replication slots, and other factors that could be slowing down the freezing process

<figure><img src="https://3013412235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj94nGPKUS9dlzKveRYHc%2Fuploads%2FfxVtwZZuAgRqaXyMaM1i%2Fimage.png?alt=media&#x26;token=3accb410-9568-4a2f-a5a8-5019f5580235" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://klouddb.gitbook.io/klouddb_shield/transaction-wraparound-report-postgres.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
