I just installed postgresql in Ubuntu 18.04 and been going through the official guide. Things I understand:
The questions I have are:
You should read the documentation, this is no substitute.
It is ok to use the user postgres
to create databases.
Ideally there should be no remote connections with user postgres
(block it in pg_hba.conf
).
Never let an application connect as superuser.
You should create other database users that are not superusers to create objects and work with them.
The name of the database users has no connection to the name of your operating system users.
For maximum safety, create objects with one user and let your application connect with a different user that has the required permissions on the objects.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.