Re: A question about pages - Mailing list pgsql-novice

From Tom Lane
Subject Re: A question about pages
Date
Msg-id 6500.1136932346@sss.pgh.pa.us
Whole thread Raw
In response to A question about pages  (tmorelli@tmorelli.com.br)
List pgsql-novice
tmorelli@tmorelli.com.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

pgsql-novice by date:

Previous
From: tmorelli@tmorelli.com.br
Date:
Subject: A question about pages
Next
From: Brendan Duddridge
Date:
Subject: Intel Macs and PostgreSQL