It does depend on the environment.
Before/After mass, it’s always cordial, and some what formal, yet always warm.
When I’m working behind the office doors, the relationship is some what changed. Our head pastor, is much like a teasing uncle. There is lots of teasing banter and laughter, yet always respect, he things nothing of hugging any of the adults, patting your back, etc. Our associate pastor is much like a brother to me, and I’ll miss him immensely when he transfers. I work with the associate pastor often as I am planning leader for our high school youth group (not sure how that came to be), so it’s quite casual. There is mutual respect, genuine concern/affection and fun teasing. I once commented that he was ‘showing his age’ in front of the other youth leaders who are in university. I felt immediately disrespectful, as it was with others present. And Fr. looked at me winked and told me I’d always be older than him(4 years older…lol). Our newest pastor, I don’t know and it’s quite formal at this time, but others who know him, laugh and joke with him, so it’s relationship based.
Now, my 18yo son, does not go to church regular, and is struggling with the whole concept of religion and faith. I’m ok with this as Fr. said, we all go through these things. Just keep praying. And he recently started dating a lovely girl. She ends up being a catholic girl

so he has to be respectful with comments toward religion, as he can be rather negative at times. He was invited to her dad’s birthday. And she gave him a heads up that her ‘uncle’ and godfather would be there. Turns out he’s a priest!

The irony. Anyway, he was a little nervous. Her dad told her that when he got there, bring him a beer, and he’s got a friend for life. It’s what he did, and he patted ds on the back, told him ‘good man’, and the ‘guys’ all went to watch the football game. The experience has changed his perspective some what.
So, how you treat them or interact with them, really depends on your relationship with them. If he is simply your pastor, then it’s a more formal relationship. However if there is a friendship, or working relationship, or family connection, it changes the dynamics somewhat.