Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • 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
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex MPP Analytics for PostgreSQL
  • Getting started
    • All guides
      • Connecting to a database
      • 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 Greenplum® 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 October 20, 2025
  • 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 Greenplum® 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 the list of databases in a cluster, 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 Greenplum® settings at the database levelChanging Greenplum® 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.

Was the article helpful?

Previous
Connecting to a database
Next
Queries in Yandex WebSQL
© 2025 Direct Cursus Technology L.L.C.