postgresql transaction id monitoring with nagios - Mailing list pgsql-performance

From Tony Wasson
Subject postgresql transaction id monitoring with nagios
Date
Msg-id 6d8daee30605021126o7b44e255q552dcdc676c565bf@mail.gmail.com
Whole thread Raw
Responses Re: postgresql transaction id monitoring with nagios
List pgsql-performance
Ever since I started working with PostgreSQL I've heard the need to
watch transaction IDs. The phrase "transaction ID wraparound" still
gives me a shiver. Attached it a short script that works with the
monitoring system Nagios to keep an eye on transaction IDs. It should
be easy to adapt to any other monitoring system.

It runs the textbook query below and reports how close you are to wraparound.
          SELECT datname, age(datfrozenxid) FROM pg_database;

The script detects a wrap at 2 billion. It starts warning once one or
more databases show an age over 1 billion transactions. It reports
critical at 1.5B transactions. I hope everyone out there is vacuuming
*all* databases often.

Hope some of you can use this script!
Tony Wasson

Attachment

pgsql-performance by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Slow restoration question
Next
From: Brendan Duddridge
Date:
Subject: Re: Slow restoration question