Pivotal Knowledge Base

Follow

Query Failing with Error Message "ERROR: Unable to detoast datum"

Environment

  • Pivotal Greenplum Database (GPDB) 4.3.x
  • Operating System- Red Hat Enterprise Linux 6.x

Symptom

When running a query, the query is failing with the following error:

ERROR: Unable to detoast datum (tuptoaster.c:260) (seg29 slice3 sdw8.gphd.local:1026 pid=530277) (cdbdisp.c:1326)

Resolution

When there is no statistics on a table, a query can fail with this error message. Check pg_class table to verify if there are stats on the table.

To fix this issue all the tables in the query need to be analyzed.

To analyze a table you need to run the following on all the tables:

analyze table_name;

Comments

Powered by Zendesk