When installing PostgreSQL via MacPorts (and I assume via other means too), a postgres:postgres
user/group is created. Are there any reasons why this user/group is needed?
Postgresql – Why does PostgreSQL require its own user/group for installation
mac os xpostgresql
Related Question
- PostgreSQL read-only user for pg_dumpall
- Postgresql – Who is “focker” and why does he own the schema
- PostgreSQL – How to Use `psql` Without Installing via Brew on Mac OS X
- PostgreSQL Performance – Why Response Time Increases When Searching Big Tables
- Postgresql – How to setup users/groups in PostgreSQL so that each user has privileges on objects created by other users in the same group
- PostgreSQL – Permission Denied for View Beyond Its Own Schema
Best Answer
The reason is that it is wise to run the database processes under a separate account. At least one advantage of this is that the OS processes as safer in the case of the database server being hacked. On the other side the database related files are safer from the 'normal' user accounts too - the PostgreSQL cluster (or at least its data) is relatively easy to destroy with a well-aimed single-file deletion.
If you check your
passwd
file you may find lots more similar users for other services, I imagine on similar grounds.