How do you find a post ID?

Why are you trying to “permadelete” a post? Simply deleting the post record will leave dangling pointers, creating a broken database, and you may not catch all copies of the post content (especially revisions).

If there’s some illegal content in the post that you need to purge, I believe I have instructions for that.