Create a PostgreSQL cluster
Create a cluster
-
In the Control Panel, on the top menu, click Products and select Managed Databases.
-
Click Create cluster.
-
Enter the cluster name.
-
Select a location. You cannot change the location after the cluster is created.
-
Select a DBMS — PostgreSQL.
-
Select a version PostgreSQL. You cannot change the version after the cluster is created.
-
Fill in the blocks:
- Node configuration;
- optional: Fault tolerance;
- optional: Logging;
- Network;
- optional: Security;
- Connection pooler;
- optional: DBMS settings.
-
Check the price of the Managed Database cluster.
-
Click Create cluster.
Node configuration
-
Select a configuration line.
-
If you selected a line with custom configurations, select the disk type, specify the number of vCPUs, RAM size, and disk size.
-
If you selected a line with fixed configurations, select a configuration.
You can change node configuration after the cluster is created by scaling the cluster.
Optional: Fault tolerance
To ensure cluster fault tolerance, add replicas—full copies of the master node. To do this, specify the number of nodes in the cluster. The first node is the master node; the remaining ones are replicas. Replicas are available for read-only operations (SELECT).
Multiple-node clusters are covered by an SLA — we guarantee 99.95% write availability and 99.99% read availability.
Optional: Logging
To access cluster logs, enable logging. Logging uses some of the cluster's computing resources.
-
Select the checkbox Collect technical cluster logs into the log service.
-
Select a log group or create a new one.
-
If you selected a new group, enter its name.
Network
A PostgreSQL cluster can be added to a new or existing subnet. The subnet can be:
-
private — without internet access. You can connect a public IP address for internet access. A separate public IP address is assigned to each cluster node. To connect a public IP address, the private subnet must meet the requirements;
-
public — where all addresses are accessible from the internet.
Private subnet
Public subnet
-
To add an existing private subnet:
1.1. In the Subnet field, select an existing subnet. The number of addresses in the selected subnet must be at least the number of nodes in the cluster. You cannot change the subnet after the cluster is created.
1.2. Optional: to make cluster nodes accessible from the internet, select the Public access to cluster nodes checkbox, and then the checkbox for the node you want to provide public access to. The private subnet must meet the requirements. If the subnet does not meet the requirements, you can connect a public IP address after the cluster is created.
-
To add a new private subnet:
2.1. In the Subnet field, select New private subnet. The number of addresses in the subnet must be at least the number of nodes in the cluster. You cannot change the subnet after the cluster is created.
2.2. Optional: change the subnet CIDR.
2.3. Optional: change the network in which the subnet will be created — you can select an existing network or create a new one. You cannot change the network after the cluster is created.
Optional: Security
Select security groups to filter incoming and outgoing cluster traffic.
If the Security block is missing, traffic filtering (port security) is disabled in the cluster network. With traffic filtering disabled, all traffic will be allowed.
Connection pooler
To optimize resource consumption, you can use a connection pooler.
- Select a pooling mode:
- transaction — a connection is assigned to a client for the duration of a transaction;
- session — a connection is assigned as long as the client is connected;
- statement — transactions with multiple statements are prohibited.
- Select a pool size.
Optional: DBMS settings
To view the default values of DBMS settings or change them, click Edit. We recommend changing setting values only when necessary — incorrect values can cause cluster failure or reduced performance.
Create a database
- Create a user — the database must have an owner user.
- In the Dashboard, on the top menu click Products and select Managed Databases.
- Open the Active tab.
- Open the cluster page → Databases tab.
- Click Create Database.
- Enter a database name.
- Select a database owner user.
- Enter the character set locale (
LC_CTYPE) — it is responsible for character classification and case variations. You cannot change the locale after the database has been created. Learn more about locales in the PostgreSQL documentation. - Enter the collation locale (
LC_COLLATE) — it determines string and character comparison settings and also affects sorting. You cannot change the locale after the database has been created. - Click Create.