From: Jehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
To: Fabio Pardi <f.pardi@portavita.eu>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Query to monitor index bloat
Date: Tue, 17 Jul 2018 10:21:08 +0200
Message-ID: <20180717102108.0de002a8@firost> (raw)
In-Reply-To: <febe631a-4007-bcd3-a5fe-cdb23b47a029@portavita.eu>
References: <CAM9F+O1jAPSPTqWeOj18NFjkOyy4DOaM3NS51ARE_rxB3fLMOQ@mail.gmail.com>
<febe631a-4007-bcd3-a5fe-cdb23b47a029@portavita.eu>
On Tue, 17 Jul 2018 10:11:50 +0200
Fabio Pardi <f.pardi@portavita.eu> wrote:
> If you monitor using nagios (or if you want to make a wrapper around it):
>
> https://bucardo.org/check_postgres/check_postgres.pl.html#bloat
...and check this one: https://github.com/OPMDG/check_pgactivity/
It uses bloat queries for tables and btree indexes Adrien Nayrat was pointing
earlier in this thread.
In fact, both queries in check_pgactivity were written because the bloat check
in check_postgres was considering **all** fields were in **all***
indexes...Which is quite a large approximation...I don't know if this is still
the case though.
> works like a charm.
>
> regards,
>
> fabio pardi
>
>
> On 07/16/2018 05:16 PM, Alessandro Aste wrote:
> > Hello, I am trying to put togheter a query to monitor the index bloat
> > for a database I maintain.
> > Is there a "SQL" way to obtain bloated index ? I googled around but I
> > found nothing working.
> >
> > I'm currently running 9.6 but I'm looking for something compatible with
> > version 10 too.
> >
> > Thank you very much in advance,
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ioguix@free.fr, f.pardi@portavita.eu
Subject: Re: Query to monitor index bloat
In-Reply-To: <20180717102108.0de002a8@firost>
References: <CAM9F+O1jAPSPTqWeOj18NFjkOyy4DOaM3NS51ARE_rxB3fLMOQ@mail.gmail.com> <febe631a-4007-bcd3-a5fe-cdb23b47a029@portavita.eu> <20180717102108.0de002a8@firost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox