Re: TOAST error in 7.4.2 on frequently truncated tables - Mailing list pgsql-bugs

From Tom Lane
Subject Re: TOAST error in 7.4.2 on frequently truncated tables
Date
Msg-id 15518.1093410780@sss.pgh.pa.us
Whole thread Raw
In response to TOAST error in 7.4.2 on frequently truncated tables  (Josh Berkus <josh@agliodbs.com>)
Responses Re: TOAST error in 7.4.2 on frequently truncated tables  (Josh Berkus <josh@agliodbs.com>)
List pgsql-bugs
Josh Berkus <josh@agliodbs.com> writes:
> DBD::Pg::st execute failed: ERROR:  expected both swapped tables to have TOAST
> tables at sql_data_xfer.pl line 120, <STDIN> line 2.

Have you done more to this table than TRUNCATE it?

We recognized relatively recently that ALTER DROP COLUMN could drop the
last/only variable-width column, in which case there is no longer any
need for a TOAST table.  The 8.0 code for CLUSTER/TRUNCATE copes with
this possibility but 7.4 doesn't.

I'm quite sure you couldn't get this error from anything except CLUSTER
or TRUNCATE in 7.4 though.  Seems like your client-side code is in error
to be fingering a plain SELECT as the cause.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Josh Berkus
Date:
Subject: TOAST error in 7.4.2 on frequently truncated tables
Next
From: Josh Berkus
Date:
Subject: Re: TOAST error in 7.4.2 on frequently truncated tables