Team
I have the need to have postgresql db running in multiuser mode and do my needed tasks for few mins.

How to restrict all the application layer , not to get connected with the postgres db ,
during my specific time window
 
I am aware of their application layer - username

Changing password is the last option

Any tips