diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 9176f6280b..3f0be39940 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -3174,7 +3174,8 @@ heap_truncate(List *relids) Relation rel = lfirst(cell); /* Truncate the relation */ - heap_truncate_one_rel(rel); + if (rel->rd_rel->relkind == RELKIND_RELATION) + heap_truncate_one_rel(rel); /* Close the relation, but keep exclusive lock on it until commit */ heap_close(rel, NoLock);