Code Monkey home page Code Monkey logo

Comments (4)

cavaliercoder avatar cavaliercoder commented on June 12, 2024

@robbrucks I'm building these out now and reading up on how XIDs work.

Can you tell me the different between your first two queries, as I understand (select setting from pg_settings where name = 'autovacuum_freeze_max_age') should always resolve to 2000000000 anyway and is the runtime upper bound for AGE(datfrozenxid)?

from libzbxpgsql.

cavaliercoder avatar cavaliercoder commented on June 12, 2024

Thinking this through further... Instead of percentages, would it useful to have a Zabbix items with the raw XID age value and trigger for when the XID age comes within a precise range of the wrap limit? The triggers could use the same thresholds hard coded by Postgres; 10M and 1M as per https://github.com/postgres/postgres/blob/master/src/backend/access/transam/varsup.c#L267.

I find percentages are useful for visuals, but lack precision for triggers. Or should we build both?

from libzbxpgsql.

cavaliercoder avatar cavaliercoder commented on June 12, 2024

In 038cbe2 I've added a new key pg.db.xid_age which returns the age (by transaction count) of the oldest database xid or the given database xid. These are presented as items in the PostgreSQL MVCC application in the template.

I've also added triggers to the template to match the hard coded thresholds in PostgreSQL; 10M and 1M remaining xids.

Thoughts?

from libzbxpgsql.

robbrucks avatar robbrucks commented on June 12, 2024

That will work.

from libzbxpgsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.