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.

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 versionPostgreSQL database version is selected automatically
    - 14.14, 14.17 are available
    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. 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
    - Multiple selections are allowed
    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.
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 all extensions provided by KakaoCloud PostgreSQL can be used without additional work, such as restarting the database.

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 the 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

If the instance group status is Storage-Full (Log or Data disk usage of an instance in the PostgreSQL instance group is 85% or higher, or available capacity is 30 GB or less), or the instance status is Storage-Error (Log or Data disk usage is 95% or higher, or available capacity remains 10 GB or less for more than 5 minutes), only volume expansion can be performed to ensure service stability.

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
    [⋮] buttonSet automatic backup: Configure automatic backup settings, whether to use automatic backup, retention period, and backup start time
    Expand volume: Expand PostgreSQL instance group volumes (base and log storage)
    Change parameter group: Change the parameter group applied to the instance group
    Manual failover: Perform failover for the instance group (only works in high availability)
    Create backup: Create a backup for the instance group
    Delete: Return the instance resources included in the PostgreSQL instance group 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

Expand PostgreSQL instance group volumes

Expand the volumes of a PostgreSQL instance group. Both base and log storage can be expanded up to 16 TB (16,384 GB).

Log storage usage

We recommend regularly monitoring and managing log storage usage so that it does not exceed 80%.
In KakaoCloud Alert Center, you can set alert policies based on disk usage or usage rate. In PostgreSQL instance group details, volume expansion is guided through Expand volume when usage reaches 85% or higher.
If storage usage reaches 90% or higher, old archived WAL files (archive logs) are deleted to ensure service 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 volume expansion is complete, the Cloud Trail Instance Group Volume Extend End event occurs. If any instance fails volume expansion, the information can be checked in Additional Info in the Cloud Trail log. For instances that failed volume expansion, the Instance Volume Extend End event occurs based on retry behavior. For more information, see Cloud Trail, PostgreSQL events.

Change parameter group

You can change the parameter group connected to an instance group.
When changing a parameter group, select one that matches the engine version of the instance group. If parameter values change, the PostgreSQL service currently in operation may be affected. Therefore, we recommend checking the parameter values to be applied before making changes.

If a parameter group change is already in progress, additional change requests may fail. For more information, see the Parameter group document.

  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 popup, select the parameter group to change to, then click [OK].

Delete PostgreSQL instance group

You can delete PostgreSQL instance groups that are no longer needed.
When deleting a PostgreSQL instance group, all instances are stopped and the user's instances are fully returned. After the instance group is deleted, resource usage charges are no longer incurred.

Cannot be recovered after deletion

The instance resources and backups of a deleted PostgreSQL instance group are fully returned after deletion and 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].