Couple of posts on the forums that you might find useful -
- http://forums.udacity.com/questions/6012751/permalinks/6013385
- http://forums.udacity.com/questions/6014750/a-couple-helpful-links-for-hw-3#cs253
- http://forums.udacity.com/questions/6014750/a-couple-helpful-links-for-hw-3/6015526
The post_id is the actual database (db) id of the post. So, you just need to do get_by_id() on the Posts db for the particular page id requested.
Yes, the ids are automatically generated by the database handler when you add a post to it. And the ids are generated at random to avoid clustering. (Corrected by Daniel)
For the variable passing to the handler (blog_id), check out the answer in the 3rd link.
For details, refer to the posts in the above links. Also, the forums are a very good place to hangout. If you get stuck, there is a great chance others were in the same situation too & they asked out on the forums!
Stay Udacious!