From: Stephen Frost <sfrost@snowman.net>
To: pavan95 <pavan.postgresdba@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Script to find out 'Page Corruption' and 'Fragmentation' in PostgreSQL.
Date: Tue, 20 Feb 2018 09:54:47 -0500
Message-ID: <20180220145447.GL2416@tamriel.snowman.net> (raw)
In-Reply-To: <1519120261856-0.post@n3.nabble.com>
References: <1519120261856-0.post@n3.nabble.com>
Greetings,
* pavan95 (pavan.postgresdba@gmail.com) wrote:
> I am looking for a script and its explanation of how to calculate *page
> corruption* and* fragmentation* of a relation in PostgreSQL.
When it comes to fragmentation, you might look at pg_freespacemap. If
you'd like a tool which checks all of the page-level checksums (assuming
you have them enabled..), then you might look at pgBackRest which
verifies the page-level checksums during backups. You could do a
partial check with pg_dump but that will generally only look at heap
pages and not index pages.
There can be other corruption in a page, of course, and between the heap
and indexes- you might consider looking at amcheck to see about checking
indexes.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
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: sfrost@snowman.net, pavan.postgresdba@gmail.com
Subject: Re: Script to find out 'Page Corruption' and 'Fragmentation' in PostgreSQL.
In-Reply-To: <20180220145447.GL2416@tamriel.snowman.net>
* 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