Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex MPP Analytics for PostgreSQL
  • Getting started
    • All guides
      • Managing databases
      • Queries in Yandex WebSQL
    • Connecting to an external file server (gpfdist)
    • Auxiliary utilities
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Getting a list of cluster databases
  • Creating a database
  • Creating a database copy
  • Learning the size of a database
  • Renaming a database
  • Changing the maximum number of database connections
  • Changing DBMS settings at the database level
  • Deleting a database
  1. Step-by-step guides
  2. Databases
  3. Managing databases

Managing databases in Yandex MPP Analytics for PostgreSQL

Written by
Yandex Cloud
Updated at June 3, 2026
View in Markdown
  • Getting a list of cluster databases
  • Creating a database
  • Creating a database copy
  • Learning the size of a database
  • Renaming a database
  • Changing the maximum number of database connections
  • Changing DBMS settings at the database level
  • Deleting a database

Yandex MPP Analytics for PostgreSQL allows you to manage cluster databases using only SQL queries.

A database can be modified or deleted only by its owner.

Getting a list of cluster databasesGetting a list of cluster databases

The list of databases is available to all users.

SQL

To get a list of cluster databases, run this command:

SELECT * FROM pg_database ORDER BY datname;

Creating a databaseCreating a database

To create a database, a role with the CREATEDB attribute is required.

SQL

To create a database, run this command:

CREATE DATABASE <DB_name> <parameter_name> <parameter_value>;

There can be several parameter name: parameter value pairs.

Available parameters:

  • TEMPLATE: Database template. All the DB contents specified in the TEMPLATE parameter will be copied to the new database, including the data tables. The default value is template1.
  • CONNECTION LIMIT: Maximum number of connections.

For more information about the available parameters, see the official Greenplum® documentation.

For example, to create a database named db1 that can process a maximum of 55 active connections, run this command:

CREATE DATABASE db1 CONNECTION LIMIT 55;

Creating a database copyCreating a database copy

Creating a database copy requires a role with the CREATEDB attribute.

SQL

To create a copy of a database in the same cluster, run this command:

CREATE DATABASE <copy_name> TEMPLATE <name_of_DB_to_copy>;

Learning the size of a databaseLearning the size of a database

Database size info is available to all users.

SQL

To learn the size of a database, run this command:

SELECT pg_size_pretty(pg_database_size('<DB_name>'));

Renaming a databaseRenaming a database

SQL

To rename a database, run this command:

ALTER DATABASE <DB_name> RENAME TO <new_DB_name>;

Changing the maximum number of database connectionsChanging the maximum number of database connections

SQL

To change the maximum number of connections, run this command:

ALTER DATABASE <DB_name> CONNECTION LIMIT <new_number_of_connections>;

Changing DBMS settings at the database levelChanging DBMS settings at the database level

Settings set at the database level via SQL queries override the cluster-level settings.

SQL

Changing a database-level setting:

ALTER DATABASE <DB_name> SET <setting_name> TO <new_setting_value>;

Removing a database-level setting value:

ALTER DATABASE <DB_name> RESET <setting_name>;

Removing all database-level setting values:

ALTER DATABASE <DB_name> RESET ALL;

Note

If a setting's value is removed, it will use the cluster-level value.

Deleting a databaseDeleting a database

Before deleting, make sure the following conditions are met:

  • You are the owner of the database.
  • There are no active connections to the database.
  • You are connected to another database.
SQL

To delete a database, run this command:

DROP DATABASE <DB_name>;

Warning

Deleting a database is irreversible.

Greenplum® and Greenplum Database® are registered trademarks or trademarks of Broadcom Inc. in the United States and/or other countries.

Was the article helpful?

Previous
Code examples
Next
Queries in Yandex WebSQL
© 2026 Direct Cursus Technology L.L.C.