All Products
Search
Document Center

ApsaraDB RDS:Create a database

Last Updated:Mar 28, 2026

Create a database on an ApsaraDB RDS for PostgreSQL instance using the RDS console or by running a SQL statement. To automate database creation at scale, use the CreateDatabase API operation.

Prerequisites

Before you begin, ensure that you have:

Constraints

  • Database names cannot be changed after creation.

  • The character set cannot be changed after creation. Choose carefully before clicking Create.

  • To migrate data from an on-premises database, create the database and an account on the RDS instance in advance. Make sure the database has the same properties as the on-premises database and the account has the same permissions.

Create a database using the console

  1. Go to the Instances page. In the top navigation bar, select the region where your instance resides. Find the instance and click its ID.

  2. In the left-side navigation pane, click Databases.

  3. Click Create Database.

  4. Configure the following parameters.

    ParameterRequiredDescription
    Database NameYesThe name of the database. The name must be up to 63 characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (_). It must start with a lowercase letter and end with a lowercase letter or a digit.
    Supported Character SetYesThe character set for the database. This cannot be changed after the database is created.
    CollateNoThe collation rule for sorting strings.
    CtypeNoThe character type supported by the database.
    Authorized ByNoThe owner of the database. The owner has all permissions on the database.
    DescriptionNoAn optional description for the database.
  5. Click Create.

The new database appears on the Databases page. 创建的账号

The Databases page also shows the following read-only fields after creation.

FieldDescription
ConnLimitThe maximum number of concurrent requests allowed for the database. Unlimited by default. To change this value, log in to the database with a privileged account and run: ALTER DATABASE <database_name> CONNECTION LIMIT ;
TablespaceThe tablespace the database belongs to. Defaults to pg_default. Tablespace paths cannot be viewed or modified. If you migrated data from a self-managed database, the tablespace name on the RDS instance matches the source. You can change the name of the tablespace to which a database or a table belongs to pg_default. For more information, see Use the cloud migration feature for an ApsaraDB RDS for PostgreSQL instance.

Create a database using SQL

  1. Connect to the RDS for PostgreSQL instance using a CLI or client tool.

  2. Run the following statement.

    CREATE DATABASE <database_name>;

API reference

API operationDescription
CreateDatabaseCreates a database on an RDS for PostgreSQL instance.

What's next