doc-exports/docs/opengauss/api-ref/opengauss_api_0024.html
Ru, Li Yi d97aea4dd2 opengauss_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-09-06 09:04:21 +00:00

15 KiB

Modifying Parameters of a Specified DB Instance

Function

This API is used to modify parameters in the parameter template of a specified DB instance. Before calling this API:

Constraints

The values of the modified parameters must be within the default value range of the specified database version.

URI

Request

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    values

    Yes

    Map<String,String>

    Parameter values defined by users based on the default parameter templates.

    Example: For failed_login_attempts: 4, failed_login_attempts indicates the parameter name, and 4 indicated the changed parameter value.

Example Request

  • Changing the value of failed_login_attempts to 4 (The change is applied without a DB instance reboot.)
    { 
        "values": { 
            "failed_login_attempts": "4"
        }
    }
  • Changing the value of track_activity_query_size to 2048 and the value of max_replication_slots to 25 (The changes are applied after the DB instance is rebooted.)
    {
        "values": {
            "track_activity_query_size": "2048",
            "max_replication_slots": "30"
        }
    }

Response

  • Normal response
    Table 3 Parameter description

    Name

    Type

    Description

    restart_required

    Boolean

    Whether a reboot is required.

    • true: A reboot is required.
    • false: A reboot is not required.
  • Example normal response
    • A reboot is not required.
      {
        "restart_required": false
      }
    • A reboot is required.
      {
        "restart_required": true
      }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.