Wanted to secure the postgreSQL database

Wanted to know what best practices are incorporated in Sentry to secure the postgreSQL database. Also, would like to know how the security of postgreSQL can be improved, like where , which file needs to be modified, how can we add a db user, which files, needs to be updated for this, etc.

Please share your suggestions.