Create a Babelfish for RDS PostgreSQL instance

更新时间:
复制 MD 格式

This topic describes how to create a Babelfish for ApsaraDB RDS for PostgreSQL instance.

Prerequisites

Babelfish can be enabled only during instance creation. The instance must meet the following requirements:

  • Major engine version: PostgreSQL 15

  • Product series: Basic Edition or High-availability Edition

  • Product type: Standard Edition

Usage notes

  • You cannot enable Babelfish for an existing ApsaraDB RDS for PostgreSQL instance.

  • After enabling Babelfish, you cannot disable it.

  • After the instance is created, a database named babelfish_db is automatically initialized. This is a critical database for the Babelfish feature. Do not delete this database. Otherwise, the instance will become unavailable.

Create a Babelfish-enabled RDS for PostgreSQL instance

  1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which the RDS instance resides.

  2. Click Create Instance.

  3. Follow the configuration wizard to create the instance.

    This topic describes the key parameters for enabling Babelfish when you create an ApsaraDB RDS for PostgreSQL instance. For information about other parameters, see Create an ApsaraDB RDS for PostgreSQL instance.

    The following table describes the key parameters.

    Parameter

    Value

    Engine

    Select PostgreSQL 15.

    After selecting the database engine and version, select Enable Babelfish.

    Instance Type

    Select an available instance type.

    Babelfish Migration Mode

    Specifies the Babelfish migration mode. This option is available only after selecting Enable Babelfish.

    • single-db: You can create only one SQL Server database in the Babelfish for ApsaraDB RDS for PostgreSQL instance. This database is created as a regular PostgreSQL schema.

    • multi-db: You can create multiple SQL Server databases. Each database is created in a different PostgreSQL schema with the format <database_name>_<schema_name> to prevent naming conflicts.

    For more information about how to choose a migration mode, see Migration modes.

    Initial Account

    Specifies the initial account used to manage both Babelfish and PostgreSQL.

    Important

    This privileged account cannot be deleted after creation.

    The account name must meet the following requirements:

    • The name must be 2 to 63 characters in length.

    • The name can contain only lowercase letters, digits, and underscores (_).

    • The name must start with a letter and end with a letter or a digit.

    • The name cannot start with pg.

    • The name cannot be an SQL keyword. For more information, see SQL Keywords.

    Password

    The password for the initial account.

    Note

    You can change the password after the instance is created. For more information, see Reset a password.

    The password must meet the following requirements:

    • The password must be 8 to 32 characters in length.

    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.

    • The following special characters are supported: !@#$%^&*()_+-=.

Check the Babelfish status

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the navigation pane on the left, click Basic Information.

  3. In the Configuration Information section, view the Minor Engine Version and Babelfish Status.

View the Babelfish management account

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the navigation pane on the left, click Accounts.

  3. On the User Account tab, find the privileged account that was created during instance creation. Its status is Active.

View the endpoint and TDS port

Prerequisites

The instance has a configured whitelist. For more information, see Configure a whitelist.

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the navigation pane on the left, click Database Connection.

    You can view the internal and public endpoints and the TDS port. On the Database Connection page, find the Internal Endpoint (for example, pgm-xxx.pgsql.pre.rds.aliyuncs.com) and the Babelfish TDS Internal Port (default: 1433). To add an IP address to the whitelist, click Configure Whitelist next to the internal endpoint.

    Note

API reference

API

Description

CreateDBInstance

Creates an RDS instance.

DescribeDBInstanceAttribute

Queries the details of an instance.

AllocateInstancePublicConnection

Allocates a public endpoint.

ModifyDBInstanceConnectionString

Modifies an endpoint.

DescribeDBInstanceNetInfo

Queries endpoints.