Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Managed Service for PostgreSQL
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Information about existing clusters
    • Creating clusters
    • Connecting to databases
    • Stop and start the cluster
    • SQL queries in the management console
    • Changing cluster and database settings
    • Connecting to DataLens
    • Managing PostgreSQL hosts
    • Database management
    • How to manage PostgreSQL extensions
    • Managing database users
    • Granting permissions and roles
    • Managing backups
    • Deleting clusters
    • Database migration to the Cloud
    • Creating a logical replica of Amazon RDS for PostgreSQL in Managed Service for PostgreSQL
  • Solutions
    • Creating a PostgreSQL cluster for 1C
  • Concepts
    • Relationship between service resources
    • Host classes
    • Network in Yandex Managed Service for PostgreSQL
    • Quotas and limits
    • Storage types
    • Backups
    • Assigning roles
    • Replication
    • Supported clients
  • 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
        • 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
  • Questions and answers
    • General questions
    • Questions about PostgreSQL
    • All questions on the same page
  1. Getting started

Getting started with Managed Service for PostgreSQL

  • Before you start
  • Create a cluster
  • Connect to the DB
  • What's next

To get started with the service:

  • Create a DB cluster.
  • Connect to the DB.

Before you start

  1. Go to the management console. Then log in to Yandex.Cloud or sign up if you don't have an account.

  2. If you don't have a folder yet, create one:

    1. Click Create folder in the Home page of the management console.

    2. Enter the folder name.

      • Length — from 3 to 63 characters.
      • The name may contain lowercase Latin letters, numbers, and hyphens.
      • The first character must be a letter. The last character can't be a hyphen.
    3. Select Create a default network. A network is created with subnets in each availability zone.

    4. Click Create.

You can connect to DB clusters from both inside and outside of the Cloud:

  1. To connect to a DB cluster from inside Yandex.Cloud, create a VM in the same network as the DB cluster (with Linux or Windows).
  2. To connect to a cluster from the internet, request public access to the hosts when creating the cluster.

Create a cluster

  1. In the management console, select the folder where you want to create a DB cluster.
  2. Select Managed Service for PostgreSQL.
  3. Click Create cluster.
  4. Set the cluster parameters and click Create cluster. This process is described in detail in Creating PostgreSQL clusters.
  5. When the cluster is ready, its status on the Managed Service for PostgreSQL dashboard changes to Running and its state to Alive. This may take some time.

Connect to the DB

  1. To connect to the DB server, get an SSL certificate:

    1. Create a folder:

      $ mkdir ~/.postgresql
      
    2. Get a certificate:

      $ wget "https://storage.yandexcloud.net/cloud-certs/CA.pem" -O ~/.postgresql/root.crt
      
    3. Configure permissions to the certificate:

      $ chmod 0600 ~/.postgresql/root.crt
      
  2. Use the psql command to connect:

    $ psql "host=<host address> \
          port=6432 \
          sslmode=verify-full \
          dbname=<DB name> \
          user=<DB user name>"
    

What's next

  • Read about service concepts.
  • Learn more about creating a cluster and connecting to the database.
  • Read questions and answers.
In this article:
  • Before you start
  • Create a cluster
  • Connect to the DB
  • What's next
Language / Region
Careers
Privacy policy
Terms of use
Brandbook
© 2021 Yandex.Cloud LLC