Skip to main content

Manage instance groups

Describes how to create PostgreSQL instance groups and manage connection, volumes, and parameter groups.

Log storage management

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.

Creation and usage notes
  • 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 on template1, and extensions registered in template1 can be used without additional work, such as restarting the database.

To create an instance group in the PostgreSQL service:

  1. Go to the KakaoCloud console > Data Store > PostgreSQL.

  2. Click [Create instance group].

  3. Enter the required information, then click [Create].

    ItemCategoryDescription
    Basic settingsInstance group nameName of the PostgreSQL instance group
    - Must be unique within the same project
    - Example: postgresql-instance-01
    Description (optional)Optional description up to 100 characters
    Instance availabilityHigh availability (Primary, Standby instances)Creates a Primary instance and multiple Standby instances
    - Single AZ or multi-AZ
    Single (Primary instance)Creates only one Primary instance
    - Single AZ only
    PostgreSQL settingsEngine versionThe PostgreSQL database version is selected automatically
    - For available versions, see Supported versions
    Primary portPort used to communicate with the PostgreSQL Primary instance. You can specify a port in the 1024-65535 range.
    - Default: 5432
    * Reserved ports cannot be used
    Standby portPort used to communicate with PostgreSQL Standby instances; range: 1024–65535. Specify this when high availability is selected.
    - Default: 5433
    * Reserved ports cannot be used
    IDID of the PostgreSQL database user account
    - Example: admin
    * Reserved account names (root, postgres, replication, rewind, orafce_set_umask, plprofiler) cannot be used
    PasswordInitial 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 retrieved
    Parameter groupSelect a parameter group that matches the selected engine version
    Instance typeSelect an instance type for database compute resources
    - For more information, see Instance types
    Base storageSSDConfigure 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 storageSSDStorage 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 settingsMulti-AZ optionOption available when high availability is selected. Specify subnets and the number of instances for each AZ.
    VPCSelect the network where the PostgreSQL instance database is configured
    Subnet and instance count settingsSelect 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 redundancy
    Security groupCreate a new security group or select existing security groups to apply to the instance group
    - Select up to 20 security groups
    Automatic backupAutomatic backup optionWhether to use automatic backup. When enabled, backups run automatically once a day.
    Backup retention periodAutomatic backup retention period. You can select from 1 to 35 days.
    - Changes the retention period for all automatic backups created in the instance group
    Automatic backup start timeAutomatic 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:

Reserved accounts
  • 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.
TypePrivileges
User accountCreate 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-65535 range
  • 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.

  1. 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.

  2. Go to the KakaoCloud console > Data Store > PostgreSQL.

  3. From the Instance Group menu, select the PostgreSQL instance group to access.

  4. 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.

  5. To access the instance group through PostgreSQL Client, run the PostgreSQL access command from the VM instance you created.

    PostgreSQL instance group access method 1
    PGPASSWORD={USER_PASSWORD} psql -h {ENDPOINT} -U {USER_ID} -d {DATABASE} -p {PORT}
    PostgreSQL instance group access method 2
    psql postgresql://{USER_ID}:{USER_PASSWORD}@{ENDPOINT}:{PORT}/{DATABASE}
    ItemDescription
    {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 the postgres database 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
Failover and restart

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.

Storage-Full and Storage-Error

To maintain service stability, volume expansion is the only operation available in either state. Both conditions apply to the log or data disk.

StateApplies toCondition
Storage-FullInstance groupAny instance has disk usage of at least 85% or available capacity of 30 GB or less
Storage-ErrorIndividual instanceDisk 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.

  1. Go to the KakaoCloud console > Data Store > PostgreSQL.

  2. From the Instance Group menu, view the instance group list.

    ItemDescription
    Instance group namePostgreSQL instance group name entered during creation
    - Click the instance group to view details
    StatusPostgreSQL instance group status
    - For more information, see Instance group
    Engine versionPostgreSQL database version selected during creation
    Instance typePostgreSQL instance type selected during creation
    AvailabilityInstance availability selected during creation
    Multi-AZWhether multi-AZ is used
    Automatic backup retention periodConfigured automatic backup retention period
    - Hover to check the start time
    Created atCreation date and time of the PostgreSQL instance group
    Created byUser who first created the PostgreSQL instance
    [⋮] buttonInstance group management menu

Select [⋮] next to an instance group to access these actions.

Menu itemAction
StartStart all stopped instances in the group
StopStop all instances for up to 14 days
Set automatic backupSet backup availability, retention period, and start time
Expand volumeExpand base or log storage
Change parameter groupChange the parameter group applied to the instance group
Modify security groupsChange the security groups connected to the instance group
Change instance typeChange the type of all instances in the group
Manual failoverTrigger failover in a high-availability configuration
Create backupCreate an instance group backup
DeleteRelease instance resources and delete backups

View PostgreSQL instance group details​

You can view details of a PostgreSQL instance group.

  1. Go to the KakaoCloud console > Data Store > PostgreSQL.

  2. From the Instance Group menu, select the PostgreSQL instance group whose details you want to view.

  3. View the details of the selected PostgreSQL instance group.

    TabDescription
    DetailsInstance group, connected network, backup, and PostgreSQL settings information
    InstancesList and information of instances included in the instance group
    TopologyTopology where PostgreSQL resources and network structure can be viewed
    SecuritySecurity groups connected to the instance group
    BackupBackups created for the instance group
    MonitoringMonitoring 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.

  1. Go to the KakaoCloud console > Data Store > PostgreSQL.

  2. From the Instance Group menu, select [⋮] button > Modify security groups for the instance group to configure.

  3. In the Modify security groups popup, select the security groups to apply to the instance group.

    ItemDescription
    Selected instance group nameName of the instance group whose security groups are being modified
    Select security groupsSelect security groups to apply. Selected security groups are displayed as chips below the selection box.
    Applied rulesView inbound and outbound rules for each security group
  4. Click [Apply].

Guide

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.

Log storage usage

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.
  1. Go to the KakaoCloud console > Data Store > PostgreSQL.
  2. From the Instance Group menu, select [⋮] button > Expand volume for the instance group to expand.
  3. Enter the storage size to expand for base or log storage, then click [OK].
Volume expansion events
  • 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 End event. Check Additional Info for instances where expansion failed.
  • Retries for individual instances produce an Instance Volume Extend End event. 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​

ActionDescriptionInstance group status after execution
StartStart all stopped instances in the instance group and transition the instance group to AvailableStarting -> Available
StopStop all instances in the instance group for up to 14 daysStopping -> 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.

Caution
  • 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.
  1. Go to the KakaoCloud console > Data Store > PostgreSQL.
  2. From the Instance Group menu, select [⋮] button > Stop for the instance group to stop.
  3. 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​

Guide

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.

  1. Go to the KakaoCloud console > Data Store > PostgreSQL.
  2. From the Instance Group menu, select [⋮] button > Start for the stopped instance group.
  3. 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.

Deletion is permanent

Released instance resources and deleted backups cannot be recovered.

  1. Go to the KakaoCloud console > Data Store > PostgreSQL.
  2. From the Instance Group menu, select [⋮] button > Delete for the PostgreSQL instance group to delete.
  3. 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.

PostgreSQL restart

When you switch from a predeploy parameter group to another parameter group with pgaudit enabled, PostgreSQL restarts once to apply the settings.

  1. Go to the KakaoCloud console > Data Store > PostgreSQL.
  2. From the Instance Group menu, select [⋮] button > Change parameter group for the instance group to change.
  3. 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.

Caution
  • 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.
  1. Go to the KakaoCloud console > Data Store > PostgreSQL.
  2. From the Instance Group menu, select [⋮] button > Change instance type for the instance group to change.
  3. In the popup, select the instance type to change to, then click [Change].