From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Mitesh Shah <Mitesh(dot)Shah(at)bangnetworks(dot)com> |
Cc: | Mitch Vincent <mitch(at)venux(dot)net>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: RE: Estimating Size of Database |
Date: | 2001-04-12 23:04:06 |
Message-ID: | Pine.LNX.4.30.0104130058560.1148-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Mitesh Shah writes:
> One follow up question. In the example given, it says there are 36
> bytes for each row header and 4 bytes for each pointer to a tuple. I'm
> not sure where these numbers (36 and 4) are coming from. Are they
> standard for *every* table? If my table has more than just two
> integers, for example, will each row header be more than 36 bytes?
More or less. Quoth the source:
typedef struct HeapTupleHeaderData
{
Oid t_oid; /* OID of this tuple -- 4 bytes */
CommandId t_cmin; /* insert CID stamp -- 4 bytes each */
CommandId t_cmax; /* delete CommandId stamp */
TransactionId t_xmin; /* insert XID stamp -- 4 bytes each */
TransactionId t_xmax; /* delete XID stamp */
ItemPointerData t_ctid; /* current TID of this or newer tuple */
int16 t_natts; /* number of attributes */
uint16 t_infomask; /* various infos */
uint8 t_hoff; /* sizeof() tuple header */
/* ^ - 31 bytes - ^ */
bits8 t_bits[MinHeapTupleBitmapSize / 8];
/* bit map of NULLs */
/* MORE DATA FOLLOWS AT END OF STRUCT */
} HeapTupleHeaderData;
Most of the fields are for maintaining information required for
transaction rollback and multi-version concurrency control, in case you
can't quite decode it. ;-)
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-04-13 01:18:47 | Re: Yacc / Bison difficulties |
Previous Message | Peter Eisentraut | 2001-04-12 22:30:48 | Re: Yacc / Bison difficulties |