Thread: pgstattuple module

pgstattuple module

From
"Khan, Mahmood Ahram"
Date:
<div class="Section1"><p class="MsoNormal"><font face="Times New Roman" size="5"><span style="font-size:
16.0pt">Hi,</span></font><p class="MsoNormal"><font face="Times New Roman" size="5"><span style="font-size:
16.0pt"> </span></font><p class="MsoNormal"><font face="Times New Roman" size="5"><span style="font-size:
16.0pt">I have tested “pgstattuple” with lot of scenarios & want to clarify some of the things.</span></font><p
class="MsoNormal"><fontface="Times New Roman" size="5"><span style="font-size: 
16.0pt">In the Readme file you have explained clearly about pgstattuple function. I mean explanation for each
column.</span></font><pclass="MsoNormal"><font face="Times New Roman" size="5"><span style="font-size: 
16.0pt">But for some of the functions like btree index metapage,single btree pages,bt page items are not clear to
me.</span></font><pclass="MsoNormal"><font face="Times New Roman" size="5"><span style="font-size: 
16.0pt">I have gone through the portal also but unable to find correct information. So if you have any links or
documentfor the above functions please share with me. Actually I want to understand what these columns are & the
sizesare in (KB, bytes)</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="section1" style="margin:0in;margin-bottom:.0001pt"><strong><b><font
color="purple"face="Bookman Old Style" size="2"><span style="font-size:10.0pt; 
font-family:"Bookman Old Style";color:purple;font-weight:normal"> </span></font></b></strong><p class="section1"
style="margin:0in;margin-bottom:.0001pt"><strong><b><fontcolor="purple" face="Bookman Old Style" size="2"><span
style="font-size:10.0pt;
font-family:"Bookman Old Style";color:purple">Thanks & Regards</span></font></b></strong><p class="section1"
style="margin:0in;margin-bottom:.0001pt"><fontface="Times New Roman" size="3"><span
style="font-size:12.0pt"> </span></font><pclass="section1" style="margin:0in;margin-bottom:.0001pt"><strong><b><font
color="#333399"face="Bookman Old Style" size="2"><span style="font-size:10.0pt; 
font-family:"Bookman Old Style";color:#333399">M.AHRAM KHAN</span></font></b></strong><p class="section1"
style="margin:0in;margin-bottom:.0001pt"><spanclass="MsoHyperlinkFollowed"><u><font color="#333399" face="Bookman Old
Style"size="2"><span style="font-size:10.0pt;font-family:"Bookman Old Style"; 
color:#333399"><span style="text-decoration:none"> </span></span></font></u></span><p class="MsoNormal"><font
face="TimesNew Roman" size="3"><span style="font-size: 
12.0pt"> </span></font></div>

Re: pgstattuple module

From
"Heikki Linnakangas"
Date:
Khan, Mahmood Ahram wrote:
> But for some of the functions like btree index metapage,single btree
> pages,bt page items are not clear to me.

Those functions display the contents of b-tree pages. They're really
meant for debugging purposes. You'll need to understand the internal
structure of a b-tree index to make sense of the output. The b-tree
internals are explained in the source tree, in
src/backend/access/nbtree/README, and the source files in the same
directory.

In fact, in 8.3, those functions have been moved to a new, separate
contrib module called pageinspect, along with similar functions for
debugging heap contents. Hopefully that makes the distinction between
functions useful for DBAs and functions useful for developers more clear.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com