Re: Script to find out 'Page Corruption' and 'Fragmentation' in PostgreSQL.

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Script to find out 'Page Corruption' and 'Fragmentation' in PostgreSQL.
Date: 2018-02-20 14:54:47
Message-ID: 20180220145447.GL2416@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Greetings,

* pavan95 (pavan(dot)postgresdba(at)gmail(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Telium Technical Support 2018-02-20 20:44:44 PostgreSQL recovery file syntax, ver 8.4 vs ver 9.5
Previous Message Stephen Frost 2018-02-20 13:52:03 Re: Disable /Suppress hostname checks while secured LDAP