How to calculate number of rows per page in postgresql - Mailing list pgsql-general

From aravind chandu
Subject How to calculate number of rows per page in postgresql
Date
Msg-id 34901.10884.qm@web31401.mail.mud.yahoo.com
Whole thread Raw
List pgsql-general
Hello,

              The following is the procedure to calculate the disk space occupied by postgresql from a flat file.
 http://www.postgresql.org/docs/faqs.FAQ.html#item4.5
In this I didn't understood some terms 
   24 bytes: each row header (approximate)
24 bytes: one int field and one text field
+ 4 bytes: pointer on page to tuple
what is that first 24 bytes and last 4 bytes represents?

I did practically but for a  table with two integer columns it takes 185 rows for a page size of 8192 for 186th it changes to 16384.But when I applied this procedure.......
 
     8 bytes: each row header
     8 bytes : two int fields     
   + 4 bytes: pointer on page to tuple   
  total 20 bytes
  8192/20 =410 rows per page (approx.)

     Can you please tell me how to caluculate number of rows per page size.

Thank You,
Avin.


pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: 100% CPU pg processes that don't die.
Next
From: Greg Smith
Date:
Subject: Re: big database with very small dump !?