questions on toast tables

From: Warren Little <warren(dot)little(at)meridiascapital(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: questions on toast tables
Date: 2006-04-28 16:09:56
Message-ID: 1146240597.9528.17.camel@wlittle.meridias.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


I have a toast table that is referenced by a single user table define
below:

CREATE TABLE casedocument
(
pid varchar(12) NOT NULL,
createdt timestamp NOT NULL,
descr varchar(40),
docformat varchar(10) NOT NULL,
version int4 NOT NULL,
casepid varchar(12) NOT NULL,
createuserpid varchar(12) NOT NULL,
typepid varchar(12) NOT NULL,
sent bool DEFAULT false,
active bool DEFAULT true,
auxpid varchar(12),
CONSTRAINT copycasedoc_pkey PRIMARY KEY (pid)
)
WITH OIDS;

There are 40k rows in the user table
The toast table contains 5781417 pages

Something does not seem right here.

1) should the user table even be relying on a toast table

2) the 40k rows and data sizes do not seem to equal the number of pages
in the related toast table.

3) I know that once upon a time the table had a bytea column, but that
was dropped. Do I need to do a full vacuum on that table to get rid of
the related toast data?

thanks

--
Warren Little
Chief Technology Officer
Meridias Capital Inc
1018 W Atherton Dr
Salt Lake City, UT 84123
ph: 866.369.7763

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Robin Iddon 2006-04-28 18:18:11 Re: Backing up large databases
Previous Message Steve Burrows 2006-04-28 15:57:57 Backing up large databases