Thread: TOAST tables, cannot truncate

TOAST tables, cannot truncate

From
G u i d o B a r o s i o
Date:
Sorry for crossposting, didn't know where to post.

Any hint/help on this?!

db_postgres1=# truncate ref_v2_drs_valid_product ;
ERROR:  expected both swapped tables to have TOAST tables

I need to truncate this table, this is the first time I see this error.

Regards,
Guido


Re: TOAST tables, cannot truncate

From
G u i d o B a r o s i o
Date:
Ok, problem solved.

A previous ALTER TABLE DROP COLUMN over this table was performed.
By some reason, truncate didn't work then. Would like to know why...it does not seems to be a very frequent problem,
dueto the fact I only found one chat on the mailing lists talking about this issue, and was hard to find :( ! 

A dump of the table schema, passed to the psql command
(cat table_dump.sql | psql xxx) worked fine.

TRUNCATE is now available.

Thanks.

Guido

> Sorry for crossposting, didn't know where to post.
>
> Any hint/help on this?!
>
> db_postgres1=# truncate ref_v2_drs_valid_product ;
> ERROR:  expected both swapped tables to have TOAST tables
>
> I need to truncate this table, this is the first time I see this error.
>
> Regards,
> Guido
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend


Re: [PERFORM] TOAST tables, cannot truncate

From
Tom Lane
Date:
G u i d o B a r o s i o <gbarosio@uolsinectis.com.ar> writes:
> Ok, problem solved.
> A previous ALTER TABLE DROP COLUMN over this table was performed.
> By some reason, truncate didn't work then. Would like to know why...it does not seems to be a very frequent problem,
dueto the fact I only found one chat on the mailing lists talking about this issue, and was hard to find :( ! 

http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/commands/cluster.c

(note: cvsweb seems mighty slow today, but it is working...)

            regards, tom lane