Manage instance groups
Describes how to create PostgreSQL instance groups and manage connection, volumes, and parameter groups.
To operate PostgreSQL instance groups stably, we recommend regularly monitoring and managing log storage usage so that it does not exceed 80%. If usage exceeds a certain level, old archived WAL files (archive logs) may be deleted to ensure service stability.
Create PostgreSQL instance group
A PostgreSQL instance group is an object that manages the lifecycle of instances and backups. It has various status values, including operational and terminated states, which users can view and manage.
- If instance group creation fails due to unexpected causes such as network errors or insufficient resources, you can check the history in Cloud Trail.
- Even if you expand a volume after creating an instance group, the maximum IOPS is fixed at the initially specified value. To ensure stable performance, set an appropriate volume size when creating the instance group.
- KakaoCloud PostgreSQL recommends creating and using a new database after creating an instance group.
New databases are created based ontemplate1, and extensions registered intemplate1can be used without additional work, such as restarting the database.
To create an instance group in the PostgreSQL service:
-
Go to the KakaoCloud console > Data Store > PostgreSQL.
-
Click [Create instance group].
-
Enter the required information, then click [Create].
Item Category Description Basic settings Instance group name Name of the PostgreSQL instance group
- Must be unique within the same project
- Example: postgresql-instance-01Description (optional) Optional description up to 100 characters Instance availability High availability (Primary, Standby instances) Creates a Primary instance and multiple Standby instances
- Single AZ or multi-AZSingle (Primary instance) Creates only one Primary instance
- Single AZ onlyPostgreSQL settings Engine version The PostgreSQL database version is selected automatically
- For available versions, see Supported versionsPrimary port Port used to communicate with the PostgreSQL Primary instance. You can specify a port in the 1024-65535 range.
- Default:5432
* Reserved ports cannot be usedStandby port Port used to communicate with PostgreSQL Standby instances; range: 1024–65535. Specify this when high availability is selected.
- Default:5433
* Reserved ports cannot be usedID ID of the PostgreSQL database user account
- Example: admin
* Reserved account names (root,postgres,replication,rewind,orafce_set_umask,plprofiler) cannot be usedPassword Initial password for the PostgreSQL database user account
- Format: 8-16 characters
- Spaces and/,',",@cannot be used
⚠️ The administrator account password can be changed after the database starts
⚠️ Administrator account passwords changed by users after database startup cannot be retrievedParameter group Select a parameter group that matches the selected engine version Instance type Select an instance type for database compute resources
- For more information, see Instance typesBase storage SSD Configure the volume type and size used by the database
- Volume type: Currently, only SSD is supported. Other types will be supported in the future.
- Volume size: You can create volumes from 100 GB to 16,384 GB.
* The minimum capacity may vary depending on the selected instance type.Log storage SSD Storage used for database logs. The type cannot be changed after creation.
- Volume type: Currently, only SSD is supported. Other types will be supported in the future.
- Volume size: You can create volumes from 100 GB to 16,384 GB.
* The minimum capacity may vary depending on the selected instance type.Network settings Multi-AZ option Option available when high availability is selected. Specify subnets and the number of instances for each AZ. VPC Select the network where the PostgreSQL instance database is configured Subnet and instance count settings Select the subnet for the Primary instance and the subnet for Standby instances, then enter the number of instances
- Up to 6 instances can be created per instance group
- We recommend creating at least 2 instances in the subnet where the Primary instance is created for data redundancySecurity group Create a new security group or select existing security groups to apply to the instance group
- Select up to 20 security groupsAutomatic backup Automatic backup option Whether to use automatic backup. When enabled, backups run automatically once a day. Backup retention period Automatic backup retention period. You can select from 1 to 35 days.
- Changes the retention period for all automatic backups created in the instance groupAutomatic backup start time Automatic backup start time. Backup starts within 15 minutes from the selected time.
User accounts in instance groups
When creating a PostgreSQL instance group, users can create a user account with the ID and password they set.
This account has the Admin role and can access resources after authentication. The role and privileges of the user account are as follows:
- User accounts cannot be created with account IDs reserved for management (
root,postgres,replication,rewind,orafce_set_umask,plprofiler). - If the replication account is deleted, high availability mode may not operate properly.
| Type | Privileges |
|---|---|
| User account | Create role, Create DB, Bypass RLS, Password valid until infinity |
Connect to PostgreSQL instance group
This section describes how to access an instance group by using PostgreSQL Client.
After creating a PostgreSQL instance group and configuring the access environment, you can access it from PostgreSQL Client by entering the endpoint and user account information.
Prepare access environment
To access a PostgreSQL instance group, prepare the following access environment:
- A virtual machine (VM) instance that uses the same network as the PostgreSQL instance group you want to access
- Security group settings that allow access to the endpoint of the PostgreSQL instance group
Allow the port configured when the instance group was created in the connected security group.
- If the user specified a port: the specified port in the
1024-65535range - If the default ports are used:
Primary instance TCP 5432,Standby instance TCP 5433
Access instance group
You can access the instance group by using PostgreSQL Client.
-
Refer to Virtual Machine > Create and connect to instance to access a VM instance and prepare PostgreSQL Client. If the PostgreSQL command is not recognized, install PostgreSQL Client separately.
-
Go to the KakaoCloud console > Data Store > PostgreSQL.
-
From the Instance Group menu, select the PostgreSQL instance group to access.
-
In the Details tab, check the Endpoint and user account ID. This information is required when running PostgreSQL commands, so copy it to the clipboard or prepare it in advance.
-
To access the instance group through PostgreSQL Client, run the PostgreSQL access command from the VM instance you created.
PostgreSQL instance group access method 1PGPASSWORD={USER_PASSWORD} psql -h {ENDPOINT} -U {USER_ID} -d {DATABASE} -p {PORT}PostgreSQL instance group access method 2psql postgresql://{USER_ID}:{USER_PASSWORD}@{ENDPOINT}:{PORT}/{DATABASE}Item Description {USER_ID}Database user ID
- ID of the DB administrator account used to access the PostgreSQL instance{USER_PASSWORD}Password of the administrator account used to access the PostgreSQL instance
- Password entered when creating PostgreSQL{ENDPOINT}Endpoint information checked in the Details tab
- Endpoint of the PostgreSQL instance group{DATABASE}Name of the database to access
- KakaoCloud creates thepostgresdatabase by default
- If the user created a separate database, enter that database name to access it{PORT}Port number set when creating the instance group
- Default ports: Primary 5432, Standby 5433
* Reserved ports cannot be used
If the Primary instance changes due to automatic or manual failover or restart, internal access information may change and access may be temporarily interrupted.
Manage instance groups
This section describes how to manage active PostgreSQL instances and instance groups.
To maintain service stability, volume expansion is the only operation available in either state. Both conditions apply to the log or data disk.
| State | Applies to | Condition |
|---|---|---|
Storage-Full | Instance group | Any instance has disk usage of at least 85% or available capacity of 30 GB or less |
Storage-Error | Individual instance | Disk usage of at least 95% or available capacity of 10 GB or less persists for at least 5 minutes |
View PostgreSQL instance group list
You can view a list of currently running PostgreSQL instance groups.
-
Go to the KakaoCloud console > Data Store > PostgreSQL.
-
From the Instance Group menu, view the instance group list.
Item Description Instance group name PostgreSQL instance group name entered during creation
- Click the instance group to view detailsStatus PostgreSQL instance group status
- For more information, see Instance groupEngine version PostgreSQL database version selected during creation Instance type PostgreSQL instance type selected during creation Availability Instance availability selected during creation Multi-AZ Whether multi-AZ is used Automatic backup retention period Configured automatic backup retention period
- Hover to check the start timeCreated at Creation date and time of the PostgreSQL instance group Created by User who first created the PostgreSQL instance [⋮] button Instance group management menu
Select [⋮] next to an instance group to access these actions.
| Menu item | Action |
|---|---|
| Start | Start all stopped instances in the group |
| Stop | Stop all instances for up to 14 days |
| Set automatic backup | Set backup availability, retention period, and start time |
| Expand volume | Expand base or log storage |
| Change parameter group | Change the parameter group applied to the instance group |
| Modify security groups | Change the security groups connected to the instance group |
| Change instance type | Change the type of all instances in the group |
| Manual failover | Trigger failover in a high-availability configuration |
| Create backup | Create an instance group backup |
| Delete | Release instance resources and delete backups |
View PostgreSQL instance group details
You can view details of a PostgreSQL instance group.
-
Go to the KakaoCloud console > Data Store > PostgreSQL.
-
From the Instance Group menu, select the PostgreSQL instance group whose details you want to view.
-
View the details of the selected PostgreSQL instance group.
Tab Description Details Instance group, connected network, backup, and PostgreSQL settings information Instances List and information of instances included in the instance group Topology Topology where PostgreSQL resources and network structure can be viewed Security Security groups connected to the instance group Backup Backups created for the instance group Monitoring Monitoring information for the instance group
PostgreSQL instance group security groups
View security groups
On the Security tab, review the connected security groups and their policies. Select a security group name to open its details under VPC > Security Group.
The security group must allow traffic on the port you use to connect to the instance group.
Modify security groups
Connect at least one security group to the instance group. You can select up to 20.
-
Go to the KakaoCloud console > Data Store > PostgreSQL.
-
From the Instance Group menu, select [⋮] button > Modify security groups for the instance group to configure.
-
In the Modify security groups popup, select the security groups to apply to the instance group.
Item Description Selected instance group name Name of the instance group whose security groups are being modified Select security groups Select security groups to apply. Selected security groups are displayed as chips below the selection box. Applied rules View inbound and outbound rules for each security group -
Click [Apply].
You can manage inbound and outbound rules in VPC > Security Group.
Expand PostgreSQL instance group volumes
You can expand base and log storage to a maximum of 16 TB (16,384 GB) each.
Monitor log storage regularly to keep usage at or below 80%. Use Alert Center to configure alerts based on space used or percentage used.
- At 85% usage or higher, the instance group details page prompts you to expand the volume.
- At 90% usage or higher, the service deletes old archived WAL files to maintain stability.
- Go to the KakaoCloud console > Data Store > PostgreSQL.
- From the Instance Group menu, select [⋮] button > Expand volume for the instance group to expand.
- Enter the storage size to expand for base or log storage, then click [OK].
- Volume expansion means increasing disk capacity. Maximum IOPS does not increase. Support for increasing maximum IOPS based on expanded volume size is planned for the future.
- When group volume expansion completes, Cloud Trail records an
Instance Group Volume Extend Endevent. Check Additional Info for instances where expansion failed. - Retries for individual instances produce an
Instance Volume Extend Endevent. See PostgreSQL Cloud Trail events for details.
Stop and start PostgreSQL instance group
You can stop an instance group to reduce costs or pause short-term testing. The group automatically restarts after 14 days.
Most group features are restricted while the group is stopped. You can start the group when at least one instance is Stopped. Normal operation resumes when the group becomes Available.
Instance group status when stopped or started
| Action | Description | Instance group status after execution |
|---|---|---|
| Start | Start all stopped instances in the instance group and transition the instance group to Available | Starting -> Available |
| Stop | Stop all instances in the instance group for up to 14 days | Stopping -> Stopped |
Stop instance group
Stopping a group stops every instance in it and may affect services that use the group. Once the group is Stopped, hover over its status to see the expected restart time.
- Even when an instance group is stopped, storage and manual backup charges are incurred.
- If automatic backup is enabled, it is disabled and all existing automatic backups are deleted.
- Go to the KakaoCloud console > Data Store > PostgreSQL.
- From the Instance Group menu, select [⋮] button > Stop for the instance group to stop.
- In the popup, review and select the stop precautions. To create a manual backup before stopping, select the manual backup creation option. Click [OK].
Start instance group
When starting an instance group after a long stop period, it may take some time for the instance group to transition to the Available state.
- Go to the KakaoCloud console > Data Store > PostgreSQL.
- From the Instance Group menu, select [⋮] button > Start for the stopped instance group.
- Check the information in the popup, then click [OK].
Delete PostgreSQL instance group
Deleting an instance group stops all its instances and releases their resources. Resource usage charges for the group end after deletion.
Released instance resources and deleted backups cannot be recovered.
- Go to the KakaoCloud console > Data Store > PostgreSQL.
- From the Instance Group menu, select [⋮] button > Delete for the PostgreSQL instance group to delete.
- Enter the information in the popup, then click [Delete].
Change parameter group
Select a parameter group that matches the instance group’s engine version. Review the new values before applying them, as changes may affect the running PostgreSQL service.
Additional requests may fail while a change is in progress. For details, see Parameter group.
When you switch from a predeploy parameter group to another parameter group with pgaudit enabled, PostgreSQL restarts once to apply the settings.
- Go to the KakaoCloud console > Data Store > PostgreSQL.
- From the Instance Group menu, select [⋮] button > Change parameter group for the instance group to change.
- In the Change parameter group popup, select the parameter group to change to, then click [OK].
Change instance type
Changing the instance type applies the new specifications to every instance in the group. You can choose higher or lower specifications.
If the change fails, all instances revert to their previous specifications. For failure details, check the additional log for the Instance Group Scaling Up/Down Error event in Cloud Trail.
- Switchover occurs during an instance type change, and temporary interruption may occur.
- Check workload and memory usage before changing. If workload is high or the memory of the target specification is insufficient for current usage, data loss, performance degradation, or change request failure may occur.
- Go to the KakaoCloud console > Data Store > PostgreSQL.
- From the Instance Group menu, select [⋮] button > Change instance type for the instance group to change.
- In the popup, select the instance type to change to, then click [Change].