Re: WAL log performance/efficiency question

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: kadams(at)mxlogic(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: WAL log performance/efficiency question
Date: 2007-05-17 15:52:11
Message-ID: 464C7A2B.5030105@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Keaton Adams wrote:
> So for every data page there is a 20 byte header, for every row there is
> a 4 byte identifier (offset into the page), AND there is also a 28 byte
> fixed-size header (27 + optional null bitmap)?? (I did find the section
> in the 8.1 manual that give the physical page layout.) The other RDBMS
> platforms I have worked with have a header in the 28 byte range and a
> row pointer of 4 bytes, and that's it. I find it a bit surprising that
> PostgreSQL would need another 28 bytes per row to track its contents.

Yes, it is more than many other DBMSs. It contains mostly MVCC-related
visibility information that other DBMSs store at page level etc, or
don't have MVCC at all.

As Tom mentioned, that's going to be a bit better in 8.3. We reduced the
header size from 27 + null bitmap to 23 + null bitmap, which makes a big
difference especially on 64-bit architectures, where the header used to
be padded up to 32 bytes, and now it's only 24 bytes.

For character fields, including CHAR(100) like you have, we also store a
4 bytes length header per field. That's been reduced to 1 byte for
string shorter than 127 bytes in 8.3.

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Keaton Adams 2007-05-17 16:01:34 Re: WAL log performance/efficiency question
Previous Message Keaton Adams 2007-05-17 15:34:43 Re: WAL log performance/efficiency question