Skip to main content
Create a PostgreSQL cluster

Create a PostgreSQL cluster

Create a cluster

  1. Вcontrol panels go to Cloud platformDatabases.

  2. Click Create a cluster.

  3. Enter the name of the cluster.

  4. Select region.

  5. Select pool.

  6. Select version PostgreSQL. Once created, the version will not be able to be changed.

  7. Select node configuration:

    • fixed — configurations with different ratio of vCPU, RAM and local disk;
    • arbitrary — free choice of the ratio of resources.
  8. For a fixed configuration, select configuration line:

    • Standard;
    • CPU;
    • Memory;
    • HighFreq;
    • Dedicated.
  9. Optional: check the checkbox Add replicas and specify the number of replicas. Replicas increase the fault tolerance of the cluster.

  10. Select the type of subnet to which the cluster will be connected:

    • private subnet — a subnet without access from the Internet. You can connect a static public IP address;

    • public subnet — all addresses on the public subnet are accessible from the Internet.

  11. Select or create a subnet.

    Addresses are assigned to each node in the cluster. Make sure that the number of addresses in the subnet is not less than the number of nodes in the cluster. If you plan to increase the number of replicas after the cluster is created, select a subnet that has a supply of free addresses. Once the cluster is created, the subnet cannot be changed.

    You can address listfrom which access to the database cluster will be allowed.

  12. Optional: In a private subnet, you can connect a public IP address to a cluster node:

    • If you have selected an existing private subnet, check the box. Public access to cluster nodesand then check the checkbox of the node to which you want to grant public access. The private subnet must correspond to demands;
    • if you create a new private subnet — connect a public IP address after the cluster is created.
  13. Select connection pooler mode:

    • transaction — the connection is assigned to the client for the duration of the transaction;
    • session — the connection is assigned while the client is connected;
    • statement — transactions with multiple operators are prohibited.
  14. Select pool size.

  15. Optional: change DBMS settingsTo do this, press Modify. We recommend that you change the settings only when necessary — incorrect values can reduce cluster performance.

  16. Click Create a database cluster. The cluster will be ready for operation when it moves to status ACTIVE.

Create a database

  1. Create a user — the database must have an owner user.
  2. В control panels go to Cloud platformDatabases.
  3. Open the cluster page → tab Databases.
  4. Click Create a database.
  5. Enter the name of the database.
  6. Select the user who owns the database.
  7. Enter the character set locale (LC_CTYPE) — responsible for character classification and case differences. Once the database is created, you cannot change the locale. More information about locales in PostgreSQL documentation.
  8. Enter sorting locale (LC_COLLATE) — determines the settings for string and character comparison and affects sorting. Once the database is created, the locale cannot be changed.
  9. Click Create.