Re: A question about pages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: tmorelli(at)tmorelli(dot)com(dot)br
Cc: pgsql-novice(at)postgresql(dot)org, emorelli(at)libra(dot)com(dot)br
Subject: Re: A question about pages
Date: 2006-01-10 22:32:26
Message-ID: 6500.1136932346@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

tmorelli(at)tmorelli(dot)com(dot)br writes:
> After creating a table with just one field (char(2048)), and an index, I
> inserted 5 rows. But, surprisingly, my table still uses just one page! Even
> having 5 x 2048 = 10.240 bytes, How could it be possible? (the page size is 8K)

> I've made the test over and over. Where did I make a mistake? Looking at "ls"
> information, I see that the file size is 8192 bytes

You didn't say what test data you used, but I'll bet it's getting
compressed, or else shoved into an out-of-line TOAST table. See
http://www.postgresql.org/docs/8.1/static/storage-toast.html

You can use VACUUM FULL VERBOSE or contrib/pgstattuple/ to get a
lower-level view of the space usage within a table.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Brendan Duddridge 2006-01-11 06:19:54 Intel Macs and PostgreSQL
Previous Message tmorelli 2006-01-10 22:18:36 A question about pages