From: Tom Lane <tgl@sss.pgh.pa.us>
To: PostgreSQL <martin@portant.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: ALTER TABLE SET TABLESPACE and pg_toast
Date: Fri, 16 Dec 2005 10:23:21 -0500
Message-ID: <26244.1134746601@sss.pgh.pa.us> (raw)
In-Reply-To: <dnuip3$1rpa$1@news.hub.org>
References: <dnuip3$1rpa$1@news.hub.org>
"PostgreSQL" <martin@portant.com> writes:
> We're storing tif images in a table as bytea. We were running low on our
> primary space and moved several tables, including the one with the images,
> to a second tablespace using ALTER TABLE SET TABLESPACE.
> This moved quite cleaned out quite a bit of space on the original
> tablespace, but not as much as it should have. It does not appear that the
> corresponding pg_toast tables were moved.
I think you're mistaken; at least, the SET TABLESPACE code certainly
intends to move a table's toast table and index along with the table.
What's your evidence for saying it didn't happen, and which PG version
are you using exactly?
> 2) Also, is there a good way to determine which pg_toast tables are
> associated with any particular table and column?
pg_class.reltoastrelid and reltoastidxid. See
http://www.postgresql.org/docs/8.1/static/storage.htmlhttp://www.postgresql.org/docs/8.1/static/catalog-pg-class.html
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, martin@portant.com
Subject: Re: ALTER TABLE SET TABLESPACE and pg_toast
In-Reply-To: <26244.1134746601@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox