Although your child is growing fast, as far as you are concerned, he may still find it difficult to respect your personal space, or even think that you have one in the first place! You must have experienced so many instances when you want a few minutes alone or in the bathroom and that is when your child seems to need you the most. Kids this age find it difficult to understand that parents are also individuals and may have needs that do not include the child.
What you need to know
It is frustrating for parents when kids are not willing to leave them alone for even a couple of minutes. Everybody needs some free time and so do parents, whether to have a cup of coffee alone or have a soothing long bath.
To make them understand about the personal space of parents, you must first start to respect their personal space. When children are small they want company in the bathroom but once they are potty trained, make sure that you leave them alone in the bathroom. Gradually you can start closing the door when the child is inside. This will make them understand that this is how it should be done. To make kids understand that they are supposed to knock before entering your bedroom, you should start doing the same with them when you are entering their bedroom. Kids learn faster through observing.