Create PostgreSQL cluster for 1C
In cloud databases, you can create a PostgreSQL cluster customized specifically to work with 1C:Enterprise.
Create a cluster
Control panel
Terraform
-
In control panel go to Cloud platform → Databases.
-
Click Create a cluster.
-
Enter the name of the cluster.
-
Select region.
-
Select pool. Once created, the pool will not be able to be modified.
-
Select DBMS — PostgreSQL 1C.
-
Select PostgreSQL version. Once created, the version will not be able to be changed.
-
Select configuration line and specify the number of vCPUs, RAM size, and disk size.
The choice of configuration depends on the number of users who work with 1C at the same time and the size of the information base. For example, if up to 50 users work with 1C at the same time, a configuration with 4 vCPU and 16 GB RAM is suitable. If there are more than 50 users, we recommend the configuration with 8 vCPU and 32 GB RAM.
Once the cluster has been created, you can change the configuration of the nodes — cluster scale.
-
Optional: to customize cluster resilience, on the block. Fault tolerance specify the number of nodes in the cluster. The first node is the master node, the rest are replicas. The following applies to a multi-node cluster SLA — we guarantee 99.95% write availability and 99.99% read availability.
-
Select or create a subnet:
- private subnet — a subnet without access from the Internet. You can connect a static public IP address;
- or public subnet — all addresses on a public subnet are accessible from the Internet.
Addresses are assigned to each node in the cluster. Make sure that the number of addresses in the network 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 list from which access to the database cluster will be allowed.
-
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.
-
Optional: to change DBMS settings, press Modify. We recommend that you change the settings only when necessary — incorrect values can reduce cluster performance.
-
Check the price of the cluster.
-
Click Create a cluster. The cluster will be ready for operation when it moves to status
ACTIVE
.
Use the instructions Create PostgreSQL cluster for 1C in the Terraform documentation.
Create a database
- Create a user — the database must have an owner user.
- В control panels go to Cloud platform → Databases.
- Open the cluster page → tab Databases.
- Click Create a database.
- Enter the name of the database.
- Select the user who owns the database.
- 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.
- 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.
- Click Create.
Connect database to 1C server
To connect a PostgreSQL database as a 1C information base, use the parameters in the form of adding an information base to 1C:Enterprise:
- The secure connection is Off;
- The type of DBMS is. PostgreSQL;
- The database server is. <DNS address of the master node> port:5432;
- The name of the database is. Name of the created database;
- The database user is. User Name;
- The user's password is. Password.