Added db locking to delete a post.