diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index ecdff1e..350a20d 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -1219,6 +1219,11 @@ ExecuteTruncate(TruncateStmt *stmt) * Reconstruct the indexes to match, and we're done. */ reindex_relation(heap_relid, REINDEX_REL_PROCESS_TOAST); + + /* + * Drop any pg_statistic entry of heap_relid + */ + RemoveStatistics(heap_relid, 0); } }