Thursday , November 21 2024

PostgreSQL Cluster Authorization

In this article, we will learn how to authorize users created on a cluster based in PostgreSQL.

When authorizing at the cluster level, if there is more than one database in the same cluster, the authorizations must be defined carefully.

The authorizations granted on a cluster basis may affect other databases and database objects.

LOGIN: Users are allowed to connect to PostgreSQL using this role.

CREATE ROLE: It is defined for the authorization of creating a user. Operations such as obtaining and changing SUPERUSER authorizations must be done with a user with superuser rights.

SUPERUSER: It is the authorization to perform all operations on a cluster basis in PostgreSQL. All operations can be performed with the LOGIN right, and since it is the most privileged authority, it must be used carefully.

CREATEDB: It is the authorization required to create a new database.

REPLICATION: It is the authorization granted for using Streaming replication.

We create a user named erdem with the help of the command below and define the createrole authority and password during this creation.

The user we created above will make arrangements regarding users and roles.

Loading

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *