why does the toast table exist?

From: AI Rumman <rummandba(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: why does the toast table exist?
Date: 2011-02-16 08:36:03
Message-ID: AANLkTi=qQs3fWszfKfCktq+2szo9t9KR6+hCF7-j1TGs@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I found in my Postgresql 9.0.1 DB as follows:

select oid,relname,reltoastrelid,relpages,relfilenode,reltuples
from pg_class
where oid in ( 90662,90665);

-[ RECORD 1 ]-+-------------------
oid | 90662
relname | audit_trial
reltoastrelid | 90665
relpages | 7713
relfilenode | 373748
reltuples | 930648
-[ RECORD 2 ]-+-------------------
oid | 90665
relname | pg_toast_90662
reltoastrelid | 0
relpages | 0
relfilenode | 373751
reltuples | 0

I have no idea why the TOAST table exists for audit_trial table.

\d audit_trial
Table "public.audit_trial"
Column | Type | Modifiers
------------+-----------------------------+-----------
auditid | integer | not null
userid | integer |
module | character varying(255) |
action | character varying(255) |
recordid | character varying(20) |
actiondate | timestamp without time zone |
Indexes:
"audit_trial_pkey" PRIMARY KEY, btree (auditid)
"audit_trial_action_idx" btree (action)
"audit_trial_actiondate_desc_idx" btree (actiondate DESC) CLUSTER
"audit_trial_module_idx" btree (module)
"audit_trial_userid_idx" btree (userid)*
*

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alessandro Candini 2011-02-16 08:54:59 Re: Multithreaded query onto 4 postgresql instances
Previous Message Magnus Hagander 2011-02-16 07:46:44 Re: PostgresSQL 9.0 64 bit on windows 2008 64bit