This document is provided as an AI translation. If the translation differs from the original, the Korean original takes precedence.

Database > RDS for PostgreSQL > DB Instances

DB Instance

A DB instance is a concept that encompasses virtual equipment and installed PostgreSQL, a unit of PostgreSQL provided by RDS for PostgreSQL. You cannot directly access the operating system of the DB instance, and can only access the database through the port entered when the DB instance was created. The available port range is 5432–45432.

DB instance is identified by the name given by the user and the 32-byte ID given automatically. DB instance names have the following restrictions:

  • DB instance name has to be unique for each region.
  • DB instance names can only contain alphabets between 1 and 100 characters, numbers, and some symbols (-, _, .), and the first letter can only be an alphabetic character.

Create DB Instance

You can create a DB instance through the settings below:

Availability Zone

NHN Cloud has divided the entire system into multiple availability areas to prepare for failures caused by physical hardware problems. For each of these availability areas, storage systems, network switches, top and power supplies are all configured separately. Failure within one area of availability does not affect another area of availability, which means increasing availability across the service. If you deploy DB instances across multiple availability areas, you can increase the availability of services. Network communication is possible between DB instances created across multiple availability zones, and there is no network usage charge for this.

Caution

You cannot change the availability zone of a DB instance that has already been created.

DB Engine

The versions specified below are available:

Version Note
17
PostgreSQL 17.10
PostgreSQL 17.6
PostgreSQL 17.4
PostgreSQL 17.2 Creation and read replicas unsupported.
14
PostgreSQL 14.23
PostgreSQL 14.19
PostgreSQL 14.17
PostgreSQL 14.15 Creation and read replicas unsupported
PostgreSQL 14.6 Creation and read replicas unsupported

DB 엔진은 생성 이후 콘솔의 수정 기능으로 버전을 업그레이드할 수 있습니다. DB 엔진에 관한 자세한 내용은 DB 엔진에서 확인할 수 있습니다.

DB instance type

DB instances have different CPU cores and memory capacities, depending on the type. When you create a DB instance, you must select the appropriate DB instance type according to the database workload.

Type Description
m2 This is a type that balances CPU and memory.
c2 This is an Instance type with high CPU performance.
r2 It can be used when memory is used more than other resources.
x1 It is a type that supports high-specification CPU and memory. It can be used for services or applications that require high performance.

The type of DB instance that you have already created can be easily changed through the console.

Caution

When the type of an already created DB instance is changed, the DB instance is terminated, resulting in several minutes of downtime.

Data Storage

Stores the database's data files in data storage. DB instances support two types of data storage: HDD and SSD. Performance and price vary by data storage type, so you need to choose the right type according to your database workload. Data storage can be created in 20GB to 2TB.

Caution

You cannot change the data storage type of a DB instance that has already been created.

Note

To use 2 TB or more of data storage, contact NHN Cloud Customer Support.

The following tasks use the I/O capacity of the data storage, which may degrade the performance of DB instances during the process.

  • Backup of a single DB instance
  • High availability configuration of a single DB instance
  • Create a Read Replica
  • Rebuild a Read Replica
  • Rebuild a Standby
  • Restore to a certain point in time
  • Export backup files to Object Storage after backing up a single DB instance

High Avilability

High-availability DB instances increase availability and data durability, providing a fault-tolerant database. High-availability DB instances consist of a Primary and a Standby, and are created in different availability zones. The Standby is a DB instance prepared for failure and is not normally available. Because backups are performed on the Standby, high-availability DB instances can avoid performance degradation caused by backups. You can find the various features provided by high-availability DB instances in High-Availability DB Instance.

Information

Set DB instance default information. You can enter the DB instance name, description, DB port, and user information that you want to create by default. The user ID you enter is created with DDL permissions.

READ * Includes read-only access to the data.

CRUD * Includes READ permissions with the ability to modify data.

DDL * Includes full CRUD permissions and the authority to execute DDL queries. * Enables assignment as the database or schema owner.

Floating IP

To access a DB instance from outside, you must connect the floating IP to DB instance. You can create a floating IP only if you connect a subnet to which the Internet Gateway is used. Floating IP is charged at the same time as it is used, and separately, it is charged separately if traffic is generated in the direction of the Internet through the floating IP.

Parameter Group

A parameter group is a set of parameters that allow you to configure the database installed on a DB instance. You must select one parameter group when you create a DB instance. The parameter group can be changed freely even after it is created. For more information, refer to Parameter Group.

DB Security Group

DB security groups are used to restrict access against outside break-in. You can allow access to specific port ranges or database ports for incoming and outgoing traffic. You can apply multiple DB security groups to a DB instance. For more information, refer to DB security groups.

Backup

You can configure the database of a DB instance to be backed up periodically, or create a backup through the console whenever you want. Performance may degrade while a backup is in progress. We recommend that you perform backups during off-peak hours to avoid affecting your service. To avoid performance degradation due to backups, you can use a high-availability configuration, back up only the incremental data since the previous backup, or perform backups from a Read Replica. Backup files are stored in internal backup storage, and charges are incurred based on backup capacity. If needed, you can export them to user object storage in NHN Cloud. We recommend that you configure periodic backups to prepare for unexpected failures. For more information, see Backup and Restore.

Maintenance

Periodically, set tasks to run that can help stabilize the DB instance. If you are using file I/O, you might experience performance degradation while maintenance tasks are performed. We recommend that you run automatic maintenance tasks during off-peak hours to avoid impacting your services. If maintenance tasks are required, they are performed on all DB instances in the DB instance group at the configured time.

Enable Auto Storage Cleanup

Clean up archived write ahead logs that do not affect service behavior. Archived transaction logs that do not affect service behavior are logs that are not used when using automatic backups to restore to the current point in time.

Default Notification

You can set default notifications when creating a DB instance. Setting default notifications creates a new notification group with {DB instance name}-default name and automatically sets the notification items below. You can freely modify and delete notification groups generated by default notifications. For more information, see Notification Groups.

Items comparison method Threshold value Duration
CPU Usage >= 80% 5 minutes
Storage Remaining Usage <= 5,120MB 5 minutes
Database Connection Status <= 0 0 minutes
Storage usage >= 95% 5 minutes
Data storage fault <= 0 0 minutes
Connection Ratio >= 85% 5 minutes
Memory Usage >= 90% 5 minutes

DB Instances

You can view the DB instances created from the console. You can view in groups of DB instances, or as individual DB instances.

db-instance-list-basic

❶ Change the DB instance screen mode. ❷ Change the deletion protection settings by clicking the lock icon. ❸ Display the most recently collected monitoring metrics. ❹ Display the current status. ❺ Spinner icon appears if any work in progress exists. ❻ Change the search conditions.

DB instance's status consists of the following values, which change based on your behavior and your current status.

Status Description
BEFORE_CREATE Before creating
AVAILABLE Available
STORAGE_FULL Lack of storage
FAIL_TO_CREATE Fail to create
FAIL_TO_CONNECT Fail to connect
REPLICATION_DELAY Replication latency
REPLICATION_STOP Replication stopped
SHUTDOWN shutdown

The search conditions that can be changed are as follows.

db-instance-list-filter

❶ Retrieve the status of DB instance by filtering criteria. ❷ Retrieve availability zones by filtering criteria.

DB Instance Group Details

After viewing DB instances on the Group screen, select a DB instance group to view its details. The group details screen displays the following tabs:

Tab Description
Basic Information Displays the DB instance group name and ID, high availability configuration, Primary and Standby names, and Ping settings.
Backup Manages backups for all DB instances in the group. Backups created in other regions are also displayed.
Database & User Manages databases and users for DB instances in the group. You can also manage database connection permissions and schema query permissions.
Access Control Manages access control rules for DB instances in the group. The configured rules are applied to the pg_hba.conf file.
Manage Extensions Manages extensions that require SUPERUSER privileges for DB instances in the group.

Database & User

Database & User tab of DB instance allows you to query and control databases and users created in the DB engine.

Create a database

❶ When you click on + Create, a pop-up window appears where you can enter the name of the database. ❷ You can create the database by entering the database name and clicking Create. ❸ Designate a DDL user to be the owner. ❹ Grant database access by selecting the desired users.

Database names have the following restrictions:

  • Only characters between 1 and 63 characters, except quotes (','), can be used.
  • postgres information_schema performance_schema repmgr db_helper sys mysql rds_maintenance pgpool nsight watchdog barman rman are not allowed to use as database names.

Modify Database

❶ When you click on Modify in the database row you want to modify, a pop-up window appears where you can modify the database information. ❷ Designate a DDL user to be the owner. ❸ Grant database access by selecting the desired users. ❹ Enabling Immediate Apply Scheduled Access Control applies modifications to access control rules immediately. ❺ Click Modify to request modifications.

Synchronize Database

❶ After you click Synchronization, the synchronization confirmation pop-up window appears. ❷ You can click Confirm to request the synchronization.

Delete Database

❶ If select the database you want to delete and click on Delete, the Delete confirmation pop-up window appears. ❷ You can request deletion by clicking on Delete.

Modify Schema

❶ Click Modify on the schema row you wish to modify. A pop-up window will appear where you can update the schema information. ❷ Select a DDL user to assign as the owner. ❸ Select users to grant query permissions. Schema query access will be granted based on the selected user's permission level. ❹ Click Modify to submit your changes.

Create a User

❶ Click on + Create to see the Add User pop-up window. ❷ Enter user ID.

User ID has the following restrictions:

  • Only characters between 1 and 63 characters, except quotes (','), can be used.
  • postgres repmgr barman rman pgpool nsight watchdog dba manager mysql.session mysql.sys mysql.infoschema sqlgw admin etladm alertman prom rds_admin rds_mha rds_repl mariadb.sys are not allowed to be used as user ID.

❸ Enter a password.

Password has the following restrictions.

  • Only characters between 1 and 100 characters, except quotes (','), can be used.

❹ Select the permissions you want to grant to the user. The permissions and descriptions you can grant are as follows.

READ * Includes read-only access to the data.

CRUD * Includes READ permissions with the ability to modify data.

DDL * Includes full CRUD permissions and the authority to execute DDL queries. * Enables assignment as the database or schema owner.

❺ You can choose to add a default access control rule to give the user you're creating full database access. If you don't add a default access control rule, you must set a separate access control rule to access the database.

Modify a User

❶ When you click on Modify in the row of users that you want to edit, a pop-up window appears where you can edit information. ❷ If you do not enter a password, it will not be edited. ❸ When checking Immediate Apply Scheduled Access Control, the modifications are also applied to the access control rule immediately.

Synchronize User

❶ Click Synchronization and a Confirm Synchronization pop-up window will appear. ❷ Click Confirm to request synchronization.

Delete a User

❶ Select the user that you want to delete and click on the drop-down menu. ❷ Click Delete to open Confirm Deletion dialog, then select Confirm to complete the request. ❸ Displays additional options below when deleting a user who owns objects. See the table below for available options and their descriptions:

Force Delete * Forcibly deletes all owned objects.

Caution

Proceed with caution, as recovery is impossible without an existing backup.

Transfer Object Ownership * Transfer all owned objects to the selected user before deletion. * Allow only DDL users to be designated as the new owner. * Include databases in the scope of the object transfer.

❷ Click View Owned Objects to open Confirm Owned Objects popup. ❸ Exclude items from the deletion list by clicking the button. ❹ Click Delete to open Confirm Deletion dialog, then select Confirm to complete the request.

Access Control

Access Control tab of the DB instance allows you to query and control DB Engine access rules for specific databases and users. The rules set here apply to file pg_hba.conf.

❶ You can view the application status for access control rules. ❷ If there is any work in progress, a spinner will appear. ❸ You can search and view by entering search keywords.

The status of access control consists of the following values, which change depending on your behavior and your current status.

Status Schedule status Description
CREATED CREATE Schedule Create (requires application)
CREATED MODIFY Schedule modify (requires application)
CREATED DELETE Schedule delete (requires application)
APPLIED NONE Applied
- - Not applicable

Note

If all targets of a rule that was added by selecting a specific database and user are deleted, it appears as Not Applicable and is not applied to the configuration file.

Add Access Control Rules

❶ When you click on + Create, an Add Access Control Rule pop-up window appears. ❷ If you select Default as the input method, you can add rules by specifying a database or user stored in the DB instance. ❸ You can set the rule target to all targets, or select and specify a particular database or user. - When Custom is selected, a drop-down menu for selecting the database and user is displayed on the Database & User tab. ❹ Enter the connection address to which the rule applies in CIDR format. ❺ Select authentication method. The following authentication methods are supported by RDS for PostgreSQL.

authentication method DB Engine Settings value Description
Trust (no password required) trust Allow all connections without passwords or other authentication.
Block connection reject Block all connections.
password (SCRAM-SHA-256) scram-sha-256 Ensure that SCRAM-SHA-256 is authenticated with the password set on Database & User tab.

❻ Adjust the order in which the rules are applied with the up/down arrow buttons. - Access control rules are applied sequentially from above and the first applied rule takes priority. - If the access permission rule registered at the top is applied first, access is allowed even if there is an access blocking rule at the bottom. - Conversely, even if there is an access permission rule at the bottom, access is not allowed if the access blocking rule registered at the top is applied first. ❼ After finish setting, click Apply Changes to apply the access control settings to DB instance. ❽ When applied to DB instance, the status changes to Applied.

Note

If you select Bulk Add by Rule Source as the input method, you can bulk add rules by entering the pg_hba.conf source as-is. You can use the pg_hba.conf source as-is, including comments. For more information, see the PostgreSQL website.

Modify Access Control Rules

❶ When click Modify in the row of access control rules to modify, a pop-up window appears where you can modify existing information. ❷ Modified rules must apply access control settings to DB instances by clicking on Apply Changes.

Delete Access Control Rules

❶ After selecting the access control rules to delete, click on Delete, the Delete confirmation pop-up window appears. ❷ Deleted rules must apply access control settings to DB instances by clicking on Apply Changes.

Manage Extensions

You can get and control the extensions that require SUPERUSER permission from Manage Extensions tab of the DB instance.

Install Extensions

❶ Click Install to display a pop-up window that allows you to select the database on which to install the selected extension. ❷ Check Force Install to force installation of dependent extensions. ❸ After selecting the installed database, click Confirm to schedule the installation task. ❹ Click Cancel to cancel the scheduled task. ❺ Click Apply Changes to install the extension in the DB instance.

Delete Extensions

❶ Click Delete from the database row to be deleted to display a Confirm Delete pop-up window. ❷ Check Force Install to force deletion of dependent extensions. ❸ Click Delete to schedule the deletion task. ❹ Click Cancel to cancel the scheduled task. ❺ Click Apply Changes to delete the installed extension in the DB instance.

Synchronize Extensions

❶ If you click Synchronize, a Confirm Synchronization pop-up window will appear. ❷ Click Confirm to request synchronization.

Modify DB Instance Group

On the group details screen, you can change settings at the group level by clicking Modify Group on the Basic Information tab. The change request is processed asynchronously, and you can check the status of the group and the operations in progress until it is complete.

You can change the following items on the modification screen:

Item Description
Group name Group names can only contain between 1 and 100 uppercase and lowercase English letters, numbers, and certain symbols (-, _, .). The first character must be an English letter.
High availability A single configuration can be switched to a high availability configuration, and a high availability configuration can be switched to a single configuration.
Primary name Managed separately from the group name.
Standby name Enter this when configuring high availability for the first time. It cannot be the same as the Primary name, and the naming rules are the same as for Primary.
Ping interval Set between 1 and 600 seconds for a high availability configuration.
Failover wait time Set to an integer value of -1 or greater for a high availability configuration. When set to -1, it waits until the replication latency is resolved.
Allow automatic backup Backups are performed automatically as needed by the DB instance or based on the settings. If you don't allow auto backup, some operations are not possible, including restoration and replication.
Automatic backup retention period When automatic backup is allowed, set between 0 and 730 days.
Automatic backup retry count When automatic backup is allowed, set between 0 and 10 times.
Use scheduled automatic backup Automatic backup runs within the configured period from the backup start time.
Automatic backup strategy Specify the strategy for performing automatic backups to perform a full backup or incremental backup every day.
Backup execution target Manages the backup time and whether to perform automatic backups for DB instances. You can specify that backups are performed on one or all of the selected candidates.
Maintenance When maintenance tasks are required, they are performed on all DB instances in the group at the configured time.
Enable Auto Storage Cleanup Automatically secures capacity by deleting stored transaction logs and other data.
Log retention period When Enable Auto Storage Cleanup is used, set between 1 and 30 days.
Database & User Control Changes whether to use direct control of schemas and users for DB instances in the group.

Caution

  • If you disable high availability, the Standby is deleted and the configuration switches to a single configuration. Make sure that there is no data or settings that exist only on the Standby before proceeding.
  • You cannot change whether high availability is enabled in a DB instance group where failover is in progress.
  • You cannot change the Primary name in a private network. Additionally, the Standby name for an existing high availability configuration cannot be changed; you can only enter the Standby name when configuring high availability for the first time.
  • In a high availability configuration, the names of Primary and Standby must be different from each other.

Database User Control

RDS for PostgreSQL provides management features in the console for easy management of databases and users, but also provides a feature to allow users to control them directly. When direct control is enabled, CREATEDB and CREATEROLE privileges are granted to all DDL users currently created. The same privileges are granted when modifying the privileges of existing users via DDL or when creating new users.

Note

If users that you directly create are not granted permissions managed by RDS, they are represented by CUSTOM permissions.

DB Instance Details

Select a DB instance to view its details.

❶ Click the domain in the connection information to open a pop-up window where you can check the IP address. ❷ Click the DB security group to open a pop-up window where you can check the DB Security Rules. ❸ Click the parameter group to go to the screen where you can view the parameters. ❹ You can drag and drop with the mouse to adjust the height of the details panel. ❺ You can adjust the height of the details panel to a preset height.

Connection Information

When a DB instance is created, an internal domain is issued. The internal domain points to an IP address that belongs to the user's VPC subnet. For high availability DB instances, the internal domain does not change even if a failover is performed and the Standby becomes the new Primary. Therefore, unless there is a specific reason, the connection information for your application must use the internal domain.

If a floating IP is created, an external domain is additionally issued. The external domain points to the address of the floating IP. Because the external domain or floating IP can be accessed from outside, you must configure the rules of the DB security group appropriately to protect the DB instance.

Log

In the Log tab of a DB instance, you can view or download various log files. Log files are rotated with the following fixed settings. Some log files can be enabled or disabled in the parameter group.

Item Rotation Settings Configurable
postgresql.log 100 MB, 40 files Static
backup.log Daily, 10 files Static

❶ Click View Log to open a pop-up window where you can view the contents of a log file. You can view up to 65,535 bytes of logs. ❷ Click Import to request a download of the log file from the DB instance. ❸ When the download is ready, the Download button appears. Click it to download the log.

Note

When you click Import, the log file is uploaded to backup storage for about 5 minutes, and you are charged for backup storage for the size of the log file. When you click Download, you are charged for internet traffic for the size of the log file.

Modify DB Instance

You can change various settings of a DB instance created in the Console. The items that you requested to change are applied to the DB instance sequentially. If a restart is required during the application process, the DB instance is restarted after all changes are applied. The following table lists items that cannot be changed and items that require a restart:

Item Changeable Restart Required
Availability zone No
DB version Yes Yes
DB instance type Yes Yes
Data storage type No
Data storage size Yes Yes
Name Yes No
Description Yes No
DB port Yes Yes
VPC subnet No
Floating IP Yes No
Parameter group Yes Depends on whether the changed parameter requires a restart
DB security group Yes No
Auto scale storage Yes No

For high availability DB instances, when changes require a restart, the restart using failover feature is available to improve stability and minimize downtime.

modify-ha-popup

If you do not use restart using failover, changes are applied to Primary and Standby sequentially, and then the DB instance is restarted. For more information, see Manual Failover of high availability DB instances.

Delete DB instance

You can delete DB instances that you no longer use. Deleting a Primary also deletes all Read Replicas that belong to the same replication group. A deleted DB instance cannot be recovered, so we recommend that you enable the deletion protection setting for important DB instances.

Backup

You can prepare in advance to recover the DB instance's database in case of failure. You can perform backups from the console whenever you need to or you can set to perform periodical back up. For more information, see Backup.

Restoration

You can use backup to restore data to any point in time. Restoration always creates a new DB instance and cannot be restored to an existing DB instance. For more information, see Restore.

Secure Capacity

If WAL logs are excessively generated due to rapid load and the data storage is low in capacity, you can delete the WAL logs using the capacity acquisition feature on the console. When you select Free Capacity from the console, a pop-up window appears to select WAL log for the DB instance. Select the WAL log and click Confirm to delete all WAL logs created before the selected item. The capacity acquisition feature is to temporarily secure capacity. If you continue to run out of capacity, you must scale up your data storage to meet the service load.

Caution

Depending on the deleted WAL logs, restoration to a specific point in time may not be possible.

Auto Scale Storage

You can automatically scale the data storage size of a DB instance. With auto storage expansion, you can maintain database availability by automatically scaling up when storage capacity runs out.

To use auto scale storage, you must enable Auto Scale Storage when creating and modifying DB instances.

When you enable auto scale storage, you can set three options * Storage Auto Scale Conditions: Automatically expand storage when storage utilization is above a set value for more than 5 minutes. * Storage Auto Scale Max: The maximum size that storage auto-scale can grow to. * Storage Auto Scale Cooldown: Set the amount of time after storage auto scale cooldown runs once before the feature is enabled again.

The amount of increase when the auto scale storage feature runs is set to the largest of the following values: * 10 GB * 10% of storage size * Data storage usage growth in the last hour * cooldown (in hours)

Apply Parameter Group Changes

Even though the settings of the parameter groups connected to the DB instance changed, it does not automatically apply to the DB instance. If the parameters applied to DB instance and the settings of the connected parameter group are different, Parameter button is displayed in the console.

You can apply changes to a parameter group to a DB instance using one of the following methods.

db-instance-list-apply-parameter-group

❶ Click Parameter for destination DB instance, or ❷ Select a destination DB instance and click on Apply Parameter Group Changes menu from the drop-down menu.

If the parameters that require restart in the parameter group are changed, such DB instance is restarted in the process of applying the changes.

db-instance-list-apply-parameter-group-popup

❶ Click Compare Chnages to check the changed parameters. ❷ Click Confirm after checking the changes to apply the changed parameters to DB instances.

db-instance-list-apply-parameter-group-compare-popup

Export Backup Files to Object Storage after Backup

After backing up, you can export the backup file to user object storage in NHN Cloud. For details, see Export Backup Files.

Restore Using Backup in Object Storage

You can restore to a DB instance using a backup file exported from RDS for PostgreSQL to object storage. For more information, see Restore using Backup in Object Storage.

Read Replica

To improve read performance, you can create Read Replicas that can be used as read-only. You can create up to 5 Read Replicas per Primary. A Read Replica of a Read Replica cannot be created.

Create a Read Replica

To create a Read Replica, you need a backup file created from a DB instance in the replication group. If you do not have a backup file, select the DB instance to perform the backup in the following order:

❶ Read Replica with automatic backups enabled ❷ Primary with automatic backups enabled

If no DB instance meets the criteria, the request to create a Read Replica fails.

Caution

Read Replica creation time may increase in proportion to the size of the Primary database. For DB instances that are backed up, there might be a drop in storage I/O performance during the Read Replica creation process.

Note

You may be charged for Backup Storage by the size of the Data Storage required for the Read Replica creation process.

To create a Read Replica, in the console

db-instance-list-replica-create

❶ Select the original DB instance and click Create Read Replica to go to the page where you can create a Read Replica.

You can create a Read Replica with the following settings.

Items unavailable to change

When creating a Read Replica, the following items cannot be changed because they follow the settings of the original DB instance.

  • DB engine
  • Data storage type
  • User VPC subnet

Read Replica Region

When selecting a region in which to create a Read Replica, if region peering is supported, you can create a Read Replica on a subnet that belongs to a VPC in a different region by connecting a region peering between VPCs that exist in different regions. However, if you select a region different from that of the source DB instance, replication lag may occur, and DB version upgrades are not supported.

Caution

Even if region peering is connected, if the route settings are incorrect, Read Replica creation might fail or replication might stop.

Availability Zone

Select the Availability Zone for the Read Replica. For more details, see the Availability Zone section.

DB Instance Type

We recommend that you create a Read Replica with the same specification as or a higher specification than the Primary. Creating one with a lower specification may result in replication latency.

Data storage size

It is recommended to make it the same size as the source DB instance. If you set a smaller size, the replication process may be interrupted due to insufficient data storage capacity.

Floating IP

Select whether to use a floating IP for the Read Replica. For more information, see Floating IP.

Parameter group

When selecting a parameter group for a Read Replica, if no replication-related configuration changes are needed, we recommend that you select the same parameter group as the original DB instance. For more information, see Parameter Group.

DB Security Group

Select the DB security group to apply to the Read Replica. Rules required for replication are applied automatically, so you do not need to add them separately to the DB security group. For more details, see DB Security Group.

Backup

Select the backup settings for the Read Replica. For more details, see Backup and Restoration.

Default notifications

Select whether to enable default notifications. For a detailed description, see Default notifications.

Deletion Protection

Select whether to enable deletion protection. For a detailed description, see Deletion Protection.

Promote Read Replica

The process of breaking the replication relationship with Primary and converting a Read Replica into a standalone Primary is called promotion. A promoted Primary operates as a standalone DB instance. If replication latency exists between the Read Replica to promote and Primary, promotion does not occur until the latency is resolved. A DB instance that has been promoted cannot be reverted to its previous replication relationship.

Caution

If the Primary DB instance is in an abnormal state, the promotion cannot be performed.

Force Promote Read Replicas

Force promotes to the current point-in-time data of the Read Replica, regardless of the Primary status. If there is replication lag, you can set a wait time to wait until the lag is resolved, but because promotion proceeds regardless of whether the lag has been resolved, data loss can result. Therefore, we do not recommend using this feature unless you urgently need to bring the Read Replica into service.

End wait for replication lag during Read Replica promotion/force promotion

To end the wait operation when waiting for replication latency to be resolved during a Read Replica promotion or Force Promote, in the console

db-instance-list-stop-wait-replication-lag

❶ Click Replication Waiting brings up a popup window that allows you to end the waiting task. ❷ Click Confirm to end the waiting task.

Stop Read Replica replication

Replication on a Read Replica may stop for various reasons. If the status of a Read Replica is Replication Stopped, you must quickly identify the cause and restore it to normal operation. If the Replication Stopped status persists for an extended period, replication lag increases. If the WAL logs required to restore normal operation are unavailable, you must rebuild the Read Replica.

Rebuild a Read Replica

If a replication issue with a Read Replica cannot be resolved, you can restore it to a normal state by rebuilding it. During this process, all databases on the Read Replica are deleted and rebuilt from the Primary database. The Read Replica is unavailable during the rebuild. To rebuild a Read Replica, you need a backup file created from a DB instance in the replication group. If you do not have a backup file, see Create a Read Replica for details on behavior and precautions.

Note

Even after a rebuild, the access information (domain, IP) remains unchanged.

Restart DB Instances

If you want to restart PostgreSQL, you can restart a DB instance. To minimize restart time, it is recommended to perform when service load is low.

To restart a DB instance, use console

db-instance-list-restart

❶ Select DB instance that you want to restart and click Restart DB Instance from the drop-down menu.

Force Restart DB Instances

If PostgreSQL of a DB instance is not working properly, you can force a restart. For a forced restart, issue a SIGTERM command to PostgreSQL and wait 10 minutes for normal shutdown. After PostgreSQL shuts down successfully in 10 minutes, reboot the virtual machine afterward. If it does not shut down normally in 10 minutes, force a reboot of the virtual machine. If a virtual machine is forced to reboot, some work-in-progress transactions may be lost and the data volume may become corrupted, making it impossible to recover. After a forced restart, the state of the DB instance might not return to the enabled state. Please contact the customer support if such situation occurs.

Caution

Because there is a possibility of data loss or data volume corruption, this feature should not be used except in urgent and unavoidable circumstances.

To force a DB instance restart from console

db-instance-list-force-restart

❶ Select the DB instance that you want to force restart and click on Force Restart DB Instance menu from the drop-down menu.

Change Deletion Protection Settings

Enabling deletion protection secures DB instances from accidental deletion. You will not be able to delete that DB instance until you disable the feature. To change the deletion protection settings

db-instance-deletion-protection

❶ After selecting the DB instance for which you want to change the deletion protection settings, click Change Deletion Protection Settings from the drop-down menu, and a pop-up window will appear.

deletion-protection-popup

❷ Click Confrim after changing the deletion protection settings.

High Availability DB Instance

High-availability DB instances increase availability and data durability, providing a fault-tolerant database. High availability DB instances consist of a Primary and a Standby, and are created in different availability zones. The Standby is the DB instance in case of failure and is not normally available. For high-availability DB instances, backups are performed on the Standby.

Caution

For high availability DB instances, if you force replication from another DB instance or from an external PostgreSQL primary with a PostgreSQL query statement, high availability and some features will not work properly.

Failure Detection

The Standby has a process for detecting failures, which periodically detects the health of the Primary. These detection cycles are called ping intervals, and failover occurs if four consecutive health checks fail. The shorter the ping interval, the more sensitive it is to failures, and the longer the ping interval, the more insensitive it is to failures. It is important to set the appropriate ping interval for your service load.

Caution

If the Primary's data storage usage fills up, the high-availability watchdog process detects the failure and initiates failover.

Auto Failover

If the Standby fails four consecutive health checks on the Primary, it determines that the Primary is unable to provide service and automatically fails over. To prevent split-brain, all security groups assigned to the failed Primary are unlinked to prevent external access, and the Standby assumes the role of the Primary. The internal virtual IP for connectivity is changed from the failed Primary to the Standby, so no changes to the application are required. When failover is complete, the failed Primary's type is changed to Failed Over Primary and the Standby's type is changed to Primary. During the failover process, automatic recovery occurs for the failed Primary, and if the automatic recovery is successful, the Failed Over Primary functions as a Standby again. Failover does not occur until the Failed Over Primary is recovered or rebuilt. The promoted Primary inherits all automatic backups from the Failed Over Primary. You can restore a point in time from the time a new backup was taken on the promoted Primary.

Caution

Since the high availability feature is based on domains, if the network environment is such that the client attempting to connect cannot reach the DNS server, the DB instance cannot be accessed through the domain, and normal access is not possible in the event of a failover. Access may be temporarily interrupted while the internal virtual IP is changing from Standby to Primary.

Failed Over Primary

A Primary that fails and becomes a failover is called a Failed Over Primary. Automatic backups of a Failed Over Primary are not performed, and all other functions except recovering, rebuilding, detaching, and deleting a Failed Over Primary cannot be performed.

Restore Failed Over Primary

If data integrity was not compromised during the failover process, and the archived write-ahead log (Archived Write Ahead Log) from the time of the failure to the time of the recovery attempt has not been lost, you can restore the Failed Over Primary and the promoted Primary back to a high availability configuration. Because the replication relationship with the promoted Primary is re-established using the Failed Over Primary's existing database, if data integrity has been compromised or the archived write-ahead logs required for recovery have been lost, the recovery will fail. If recovery of a Failed Over Primary fails, you can use rebuild to enable high availability again.

To restore a Failed Over Primary, in the console

db-instance-ha-failover-repair

❶ Select the Failed Over Primary that you want to restore, and then click the Restore Failed Over Primary menu from the drop-down menu.

Rebuild Failed Over Primary

If recovery of a Failed Over Primary fails, you can use rebuild to enable high availability again. Unlike recovery, rebuilding removes all databases from the Failed Over Primary and rebuilds them based on the promoted Primary's database. To rebuild a Failed Over Primary, you need a backup file and an archived write-ahead transaction log (Archived Write Ahead Log) from one of the DB instances in the replication group. If no backup file is available, the DB instance to perform the backup is selected in the following order:

❶ Read Replica with automatic backup configured ❷ Primary with automatic backup configured

If no DB instance meets the criteria, the request to rebuild the Failed Over Primary fails.

Caution

The time to rebuild the Failed Over Primary may increase proportionally to the size of the Primary's database. For DB instances that are backed up, there might be a drop in storage I/O performance during the rebuilding of the Failed Over Primary.

To rebuild a Failed Over Primary, in the console,

db-instance-ha-failover-rebuild

❶ Select the Failed Over Primary that you want to rebuild, and then click Rebuild Failed Over Primary from the drop-down menu.

Detach Failed Over Primary

If the Failed Over Primary recovery fails and data correction is required, you can detach the Failed Over Primary to disable the high availability feature. The replication relationship between the detached primary and the promoted primary is severed, and each operates as a regular DB instance. Once detached, the original configuration cannot be restored.

To detach the Failed Over Primary, in the console:

db-instance-ha-failover-split

❶ Select the Failed Over Primary you want to detach, and then click the Detach Failed Over Primary menu from the drop-down menu.

Manual Failover

For highly available DB instances, when you perform an operation that involves a restart, you can choose whether to restart with failover or not, as shown below:

  • Restart DB Instance
  • Changes to items that require a restart
  • Apply changes to parameters that require a restart
  • Migrating DB instances for hypervisor checks

When you restart with failover, the Standby is restarted first. Failover then promotes the Standby to Primary, and the existing Primary acts as the Standby. Upon promotion, the internal virtual IP for connectivity changes from the Primary to the Standby, so no changes to the application are required. The promoted Primary inherits all automatic backups from the old Primary.

Caution

Since the high availability feature is based on domains, if the network environment is such that the client attempting to connect cannot reach the DNS server, the DB instance cannot be accessed through the domain, and normal access is not possible in the event of a failover.

Note

If the replication delay value of the Standby and the Read Replicas included in the replication group is 1 or more, replication delay is considered to have occurred, and manual failover fails. We recommend that you perform manual failover during off-peak hours. Restart failures due to replication delay can be checked on the Events screen.

When restarting with failover, you can select the following additional items to increase reliability.

Start backup at the current time

You can proceed with a manual backup immediately after the restart with failover is complete.

Manual Control of Failover

You can either apply the changes to the Standby first and observe how they evolve, or you can control the timing of the failover directly from the console if you want to execute the failover at a precise time. If you choose to manually control failover, a Failover button appears in the console ❶ after the Standby restarts. Clicking this button triggers a failover, which can wait up to five days to execute. If you do not run the failover within 5 days, the action is automatically canceled.

db-instance-ha-wait-manual-failover

Caution

There is no automatic failover while waiting for failover.

Waiting for replication delays to resolve

Enabling the Wait for replication latency to clear option allows you to wait for replication latency to clear for the Standby and the Read Replica included in the replication group.

Write load blocking

You can additionally block write loads while resolving replication delays. Blocking the write load puts the Primary into read-only mode just before failover, setting all change queries to fail.

High availability suspended

You can temporarily pause a high availability feature in situations where you anticipate connection disruptions or large loads due to temporary operations. When a high-availability feature is paused, it does not detect a failure and therefore does not perform failover. Performing an operation that requires a restart while a high-availability feature is paused does not resume the paused high-availability feature. Because data replication occurs normally when a high-availability feature is paused, or because a failure is not detected, it is not recommended to leave it paused for extended periods of time.

Rebuild Standby

Replication on a Standby can be interrupted for various reasons, such as a network disconnection or the initiation of replication from another Primary. A Standby with a replication interruption does not perform automatic failover. To resolve a replication interruption on a Standby, you must rebuild the Standby. Rebuilding a Standby removes all data from the Standby's database and rebuilds it from the Primary's database. During this process, if the backup files required for the rebuild do not exist in the Primary database, a backup is performed on the Primary, which can cause performance degradation.

Data Migration

  • RDS can be exported to and imported from outside of NHN Cloud RDS using pg_dump.
  • pg_dump utility is provided by default when you install PostgreSQL.

Export using pg_dump

  • Get NHN Cloud RDS instances prepared.
  • Verify that the external instance where you want to store the data to export, or the computer on which the local client is installed has sufficient capacity.
  • If you need to export data to the outside of NHN Cloud, create a floating IP and connect it to the RDS instance where you want to export the data.
  • Export data to the outside via the pg_dump command below:

Export in Files

pg_dump -h {DB instance external domain address} -U {DB instance user ID} -p {DB instance connection port} -d {Database name to export} -f {file path to save locally}

Export to PostgreSQL database outside NHN Cloud RDS

pg_dump -h {DB instance external domain address} -U {DB instance user ID} -p {DB instance connection port} -d {database name to export} | psql -h {external PostgreSQL connection address} -U {external PostgreSQL user ID} -p {external PostgreSQL connection port} -d {external PostgreSQL database name}

Import with pg_dump

  1. Create a DB instance to import data from, selecting Use Floating IP.

  2. Ensure that the DB instance you are importing has enough capacity.

  3. On the Database & User tab, pre-create the required databases.

  4. Execute the command below to get data from an external source.

pg_dump -h {external PostgreSQL connection address} -U {external PostgreSQL user ID} -p {external PostgreSQL connection port} -d {external PostgreSQL database name} | psql -h {DB instance external domain address} -U {DB instance user ID} -p {DB instance connection port} -d {DB instance database name}

Appendix

Appendix 1. Guide for DB instance Migration for Hypervisor Maintenance

NHN Cloud periodically updates the hypervisor software of the DB instance to improve security and stability. DB instances running on a hypervisor that requires maintenance must be migrated to the hypervisor where maintenance has been completed.

You can start DB instance migration from the NHN Cloud console. Depending on the database configuration, if you select a specific DB instance for migration and a related DB instance (e.g., a Read Replica instance) is also a maintenance target, both are migrated together. Follow the guide below to use the migration feature in the console. Go to the project where the DB instance requiring maintenance is located.

1. Check the DB Instance for Maintenance

Those with Migration button next to name are the maintenance targets.

db-instance-planned-migration

You can check the detailed schedule of maintenance by putting the mouse pointer over Migration button.

db-instance-planned-migration-popup

2. Stop Applications Connected to the DB Instance that Requires Maintenance

Take appropriate measures to limit the impact on services connected to the DB. If impact on service is inevitable, contact NHN Cloud Customer Support for guidance on appropriate measures.

3. Apply Migration of the DB Instance That Requires Maintenance

Select the DB instance to be checked, click Migration button and when a window appears asking for confirmation of the DB instance migration, click OK button.

db-instance-planned-migration-confirm

4. Wait for DB Instance Migration to Finish

If the DB instance status does not change, refresh the page. While the DB instance is being migrated, no operations are permitted. If the DB instance migration does not complete successfully, the issue is automatically reported to an administrator, and NHN Cloud will contact you separately.

TOP