From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Table health
Date: Wed, 18 Oct 2023 08:52:41 +0200
Message-ID: <2f4c4edac9196af943d8097150f65fa96f7ea97e.camel@cybertec.at> (raw)
In-Reply-To: <CAJk5AtbS6c-P+YzmSa=2jU=vSavUk1Or=3DEd++3iAJT+-UCDg@mail.gmail.com>
References: <CAJk5AtbS6c-P+YzmSa=2jU=vSavUk1Or=3DEd++3iAJT+-UCDg@mail.gmail.com>
On Tue, 2023-10-17 at 23:23 +0530, Rajesh Kumar wrote:
> I have been asked to check table health of specific big table.
>
> What are list of things I have to check?
Look at pg_stat_all_tables to see if the number of dead tuples
is excessive and if autovacuum and autoanalyze are running as
they should.
Look at pg_class to see if "relfrozenxid" and "relminmxid" are
far from the danger zone.
Run the function pgstattuple_approx() to see if the table is bloated.
Yours,
Laurenz Albe
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, rajeshkumar.dba09@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Table health
In-Reply-To: <2f4c4edac9196af943d8097150f65fa96f7ea97e.camel@cybertec.at>
* 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