Connect to PostgreSQL cluster for 1C
You can connect to a PostgreSQL cluster for 1C:
- through the psql terminal client;
- pgAdmin graphical database management tool;
- 1C:Enterpriseand other office suites or applications with ODBC or JDBC support;
- program code.
Connection with SSL certificate is not available.
Specify the port and address when connecting.
Connection ports
Use ports to connect to PostgreSQL for 1C:
- 5432 — port to connect directly to the PostgreSQL process for 1C;
- 6432 — port for connection to the master node.
Addresses for connection
The address to connect to depends on the cluster subnet and where you are connecting from. You can choose an address depending on one of the scenarios:
- connecting to a cluster on a public subnet;
- connect from a private subnet to a cluster on a private subnet;
- connecting from the Internet to a cluster on a private subnet.

Connecting to a cluster on a public subnet
If the cluster is on a public subnet, the nodes can be connected to by DNS address or IP address from the public subnet.
We recommend connecting by DNS address. For DNS addresses in the cluster, the master discovery mechanism is used — the address is bound to the node role, not to the node itself. If the master is unavailable, one of the replicas becomes the new master and the address is transferred to the new node along with the role.
When connecting using an IP address from a public subnet, the master discovery mechanism is not used. If one of the replicas becomes the new master, the master IP address will change and the connection to the old IP address will not work.
You can view the address to connect to in the control panel.
Connecting from a private subnet to a cluster on a private subnet
If you are connecting from a private subnet to a cluster on a private subnet, you can use a DNS address or a private IP address.
We recommend connecting by DNS address. For DNS addresses in the cluster, the master discovery mechanism is used — the address is bound to the node role, not to the node itself. If the master is unavailable, one of the replicas becomes the new master and the address is transferred to the new node along with the role.
When connecting by private IP address, the master discovery mechanism is not used. If one of the replicas becomes the new master, the master IP address will change and the connection using the old IP address will not work.
To connect from another private subnet, first connect both private subnets to the cloud router.
You can view the address to connect to in the control panel.
Connecting from the Internet to a cluster on a private subnet
Если вы подключаетесь к кластеру в приватной подсети из интернета, можно использовать только публичный IP-адрес (Floating IP). Приватная подсеть должна соответствовать требованиям. Если подсеть не соответствует требованиям, подготовьте ее для подключения публичного IP-адреса (Floating IP).
For public IP addresses (Floating IPs) the master discovery mechanism is used — the address is bound to the role of the node, not to the node itself. If the master is unavailable, one of the replicas becomes the new master and the address is transferred to the new node along with the role.
You can view the address to connect to in the control panel.
View the address for connection
- In the Dashboard, on the top menu, click Products and select Cloud Databases.
- Open the Active tab.
- Open the Database Cluster page → Connection tab.
- In the Addresses to connect block, look up the address.
Connect to the cluster
1C:Enterprise
Bash
To connect a PostgreSQL database for 1C as a 1C information base, use the parameters in the form of adding an information base to 1C:Enterprise:
- Secure connection — is off;
- DBMS type — PostgreSQL;
- Database server — DNS address or public IP address (Floating IP) of the node;
- Database name — name of the created database;
- Database user — the name of the database user;
- User password — password.
psql "host=<host> \
port=<port> \
dbname=<database_name> \
user=<database_user_name> \
sslmode=disable"
Specify:
<host>— DNS address or public IP address (Floating IP) of the node;<port>— port for connection;<database_name>— database name;<database_user_name>— database user name.