PostgreSQL limitations question - Mailing list pgsql-general

From Bartosz Dmytrak
Subject PostgreSQL limitations question
Date
Msg-id CAD8_UcZs8dMrA=UV8AckL_DUA881Pn5wWJ-YkGtnE_1djD4Y5w@mail.gmail.com
Whole thread Raw
Responses Re: PostgreSQL limitations question  (Craig Ringer <ringerc@ringerc.id.au>)
List pgsql-general
Hi All
I found PG limitations (http://www.postgresql.org/about/):
  • Maximum Rows per Table - Unlimited
  • Maximum Table Size - 32 TB
My question is:
how is it possible to *reach* unlimited rows in table?

I did a test:
1. Create Table:
CREATE TABLE test.limits("RowValue" text) WITH (OIDS=FALSE, FILLFACTOR=100);

2. Fill table (I used pgScript available in pgAdmin);
DECLARE @I;
SET @I = 0;
WHILE @I < 1000
BEGIN
        INSERT INTO test.limits ("RowValue") VALUES (NULL);
SET @I = @I + 1;
END

3. do Vacuum full to be sure free space is removed
VACUUM FULL test.limits;

4. I checked table size:
SELECT * FROM pg_size_pretty(pg_relation_size('test.limits'::regclass));
and I realized table size is 32 kB.

I used pgstattupet extension (http://www.postgresql.org/docs/9.1/static/pgstattuple.html) to check what is going on:
SELECT * FROM pgstattuple('test.limits');
and I got:
table_lentuple_counttuple_lentuple_percentdead_tuple_countdead_tuple_lendead_tuple_percentfree_spacefree_percent
3276810002400073.24000460814.06


Did I missed something?
Is there a non storage cost data type?

I know that "storage requirement for a short string (up to 126 bytes) is 1 byte plus the actual string" (http://www.postgresql.org/docs/9.1/static/datatype-character.html).


Regards,
Bartek

pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Sequence moves forward when failover is triggerred
Next
From: Jeff Ross
Date:
Subject: Re: Transaction question