New document table truncation code