dont know but they say on them body language programs that your suppost to pull away if the other person starts patting you on the back because its a sign of being uncomfortable!
If its just with a friend or family member that your not close to and your just hugging to say hello or goodbye--- long enough to say "Hi! How are you?" then pull away to hear their answer or "Well I'll give you a ring soon" if saying goodbye.