What is a postgres superuser
https://www.postgresql.org/docs/current/static/sql-createrole.html
These clauses determine whether the new role is a "superuser", who can override all access restrictions within the database.
yes - all privileges in all databases on the specified cluster
A superuser in PostgreSQL is a user who bypasses all permission checks.
Superusers can run commands that can destabilize or crash the database server (e.g., create C functions) and access the operating system.
Superuser is per database. From manual:
SUPERUSER NOSUPERUSER These clauses determine whether the new role is a "superuser", who can override all access restrictions within the database. Superuser status is dangerous and should be used only when really needed. You must yourself be a superuser to create a new superuser. If not specified, NOSUPERUSER is the default.
The superuser role bypasses all permission checks.
The term "cluster" in PostgreSQL is a historical and it is un-related to the PostgreSQL command CLUSTER
, which is about organizing tables - you set user per-database, not per-cluster. A cluster is created when PostgreSQL is installed. The installation will usually do initdb
- it will create a new cluster with one database in for you. Cluster is just data dir with databases inside. For location of that data dir look into manual.