Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Managed Service for PostgreSQL
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Information about existing clusters
    • Creating clusters
    • Connecting to a database
    • Stopping and starting clusters
    • SQL queries in the management console
    • Updating the PostgreSQL version
    • Changing cluster and database settings
    • Connecting to DataLens
    • Managing PostgreSQL hosts
    • Managing databases
    • PostgreSQL extensions
      • Managing extensions
      • pg_cron
      • pgcrypto
    • Managing database users
    • Assigning privileges and roles
    • Managing backups
    • Viewing cluster logs
    • Deleting clusters
    • Performance diagnostics
    • Monitoring the state of clusters and hosts
    • Managing replication slots
  • Tutorials
    • All use cases
    • Creating a PostgreSQL cluster for 1C
    • Exporting databases to Yandex Data Proc
    • Performance analysis and tuning
    • Delivering data to Yandex Managed Service for Apache Kafka® using Yandex Data Transfer
    • Delivering data to Yandex Managed Service for YDB using Yandex Data Transfer
    • Delivering data to Yandex Managed Service for Apache Kafka® using Debezium
    • Replication and migration
      • Logical PostgreSQL replication
      • Migrating databases to Managed Service for PostgreSQL
      • Migrating databases from Managed Service for PostgreSQL
      • Creating an Amazon RDS logical replica for PostgreSQL in Managed Service for PostgreSQL
      • Migrating databases from Yandex Managed Service for PostgreSQL to Yandex Object Storage
  • Concepts
    • Relationships between service resources
    • Host classes
      • Active host classes
      • Archive
        • Before June 1, 2020
      • Using deprecated host classes
    • Network in Managed Service for PostgreSQL
    • Quotas and limits
    • Storage in Managed Service for PostgreSQL
    • Backups
    • Assigning roles
    • Managing connections
    • Replication
    • Maintenance
    • Supported clients
    • PostgreSQL settings
    • SQL command limits
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1, 2019 to February 1, 2020
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BackupService
      • ClusterService
      • DatabaseService
      • ResourcePresetService
      • UserService
      • OperationService
    • REST
      • Overview
      • Backup
        • Overview
        • delete
        • get
        • list
      • Cluster
        • Overview
        • addHosts
        • backup
        • create
        • delete
        • deleteHosts
        • get
        • list
        • listBackups
        • listHosts
        • listLogs
        • listOperations
        • move
        • rescheduleMaintenance
        • restore
        • start
        • startFailover
        • stop
        • streamLogs
        • update
        • updateHosts
      • Database
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • ResourcePreset
        • Overview
        • get
        • list
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Operation
        • Overview
        • get
  • Revision history
  • Questions and answers
    • General questions
    • Connection
    • Updating clusters
    • Cluster configuration
    • Moving and restoring a cluster
    • Monitoring and logs
    • All questions on one page
  1. Tutorials
  2. Creating a PostgreSQL cluster for 1C

Creating a PostgreSQL cluster for 1C:Enterprise

Written by
Yandex Cloud
  • Create a Managed Service for PostgreSQL cluster
  • Connect the database to 1C:Enterprise
    • PostgreSQL extensions for 1C:Enterprise support
  • Delete the resources you created

Managed Service for PostgreSQL allows you to create fault-tolerant PostgreSQL clusters optimized for 1C:Enterprise. For this, the service supports PostgreSQL versions 11-1c, 12-1c, 13-1c, and 14-1c with all the necessary extensions installed and connection pooler configuration changed.

Warning

You can only connect 1C:Enterprise to clusters running version 11-1c, 12-1c, 13-1c, and 14-1c.

Select your host class based on the number of users in your 1C:Enterprise installation. The s2.small hosts can accommodate up to 50 users at a time. We recommend using the s2.medium class if 50 or more users are going to access the database. Choose the storage size based on your expected data scope and allow for possible growth in your data volumes.

Create a Managed Service for PostgreSQL cluster

Manually
Using Terraform

Create a Managed Service for PostgreSQL cluster of any suitable configuration with the following settings:

  • Name: postgresql-1c.

  • Environment: PRODUCTION.

  • Version: 12-1c.

  • Host class: At least s2.small.

  • Storage size: At least 10 GB.

  • Database:

    • DB name: postgresql-1c.
    • Username: user-1c.
    • Password: The password you will use to access the cluster.
  • Hosts: Add at least two more hosts in different availability zones. This provides the fault tolerance of the cluster. The database is automatically replicated. For more information, see Replication in Managed Service for PostgreSQL.

  1. If you don't have Terraform, install it.

  2. Download the file with provider settings. Place it in a separate working directory and specify the parameter values.

  3. Download the cluster configuration file postgresql-1c.tf to the same working directory.

    This file describes:

    • Network.
    • Subnet.
    • Default security group and rules required to connect to the cluster from the internet.
    • Managed Service for PostgreSQL cluster for 1C:Enterprise.
  4. In postgresql-1c.tf, specify the password for user-1c that will be used to access a Managed Service for PostgreSQL cluster.

  5. Run the command terraform init in the directory with the configuration file. This command initializes the providers specified in the configuration files and lets you work with the provider resources and data sources.

  6. Make sure the Terraform configuration files are correct using the command:

    terraform validate
    

    If there are errors in the configuration files, Terraform will point to them.

  7. Create the required infrastructure:

    1. Run the command to view planned changes:

      terraform plan
      

      If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.

    2. If you are happy with the planned changes, apply them:

      1. Run the command:

        terraform apply
        
      2. Confirm the update of resources.

      3. Wait for the operation to complete.

    All the required resources will be created in the specified folder. You can check resource availability and their settings in the management console.

Creating the DB cluster may take several minutes.

Connect the database to 1C:Enterprise

Add the created database as an information base to 1C:Enterprise. When adding the database, use the following parameters:

  • Secure connection: Disabled.
  • DBMS type: PostgreSQL.
  • Database server: c-<cluster ID>.rw.mdb.yandexcloud.net port=6432.
  • Database name: postgresql-1c.
  • Database user: user-1c.
  • User password: <database user password>.
  • Create database if none present: Disabled.

PostgreSQL extensions for 1C:Enterprise support

List of extensions installed in PostgreSQL 11-1c, 12-1c, 13-1c, and 14-1c clusters:

  • online_analyze

  • plantuner

  • fasttrun

  • fulleq

  • mchar

Delete the resources you created

Manually
Using Terraform

If you no longer need these resources, delete the Managed Service for PostgreSQL cluster.

To delete the infrastructure created with Terraform:

  1. In the terminal window, change to the directory containing the infrastructure plan.

  2. Delete postgresql-1c.tf.

  3. Make sure the Terraform configuration files are correct using the command:

    terraform validate
    

    If there are errors in the configuration files, Terraform will point to them.

  4. Confirm the update of resources.

    1. Run the command to view planned changes:

      terraform plan
      

      If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.

    2. If you are happy with the planned changes, apply them:

      1. Run the command:

        terraform apply
        
      2. Confirm the update of resources.

      3. Wait for the operation to complete.

    All resources described in postgresql-1c.tf will be deleted.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Create a Managed Service for PostgreSQL cluster
  • Connect the database to 1C:Enterprise
  • PostgreSQL extensions for 1C:Enterprise support
  • Delete the resources you created