---
search:
  tags:
    - database-services
    - POST
seo:
  description: >-
    Validates a change set (or a YAML document of… Reference for the POST
    /api/v1/database-services/{id}/settings/plan endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Review settings changes
  badge: POST
title: Review settings changes
type: openapi-operation
---
Validates a change set (or a YAML document of all overrides) against pg_settings of the leader, SHOW CONFIG of PgBouncer and the locks of the owners, and gives one review row per setting: the old and the new value, the owner, a reload or a restart, and the servers that restart in order. A change of the PgBouncer pool size gives a derived row for work_mem, which follows the pool size. A decrease of max_connections, max_locks_per_transaction or max_prepared_transactions (a row, or a change that waits for a restart) restarts the leader first, when no such parameter goes up; with an increase too, the replicas restart first and the decrease waits for the next restart. The rows also hold the overrides that wait for their apply. hba (or the hba section of the YAML document) is the whole list of the HBA rules of the user; the review checks each rule and counts the rules that the change adds, removes and changes. A plan writes nothing, and it works while a workflow runs. It answers 409 when settings_version is not the version of the store.

`POST /api/v1/database-services/{id}/settings/plan`

**Request body** (`application/json`, required)

- `changes` (SettingChangeInput[]) — The changes. Omit changes and yaml to review the overrides that wait for their apply.
- `hba` (HbaRule[]) — All HBA rules of the user, in their order (ADR D17), in place of the hba section of yaml. Omit it to keep the rules.
- `hba_version` (string) — With hba: hba.version of the settings read that the user changed. Another version of the rules gives 409, and a change of other settings does not.
- `settings_version` (integer<int64>, required) — The version that the user saw: settings\_version of the settings or of the YAML read.
- `yaml` (string) — All overrides as one YAML document (ADR D14), in place of changes. A key that is not in the document is a reset.

Request body example:

```json
{
  "changes": [
    {
      "name": "string",
      "scope": "postgresql",
      "value": "string"
    }
  ],
  "hba": [
    {
      "address": "string",
      "comment": "string",
      "database": "string",
      "method": "string",
      "type": "string",
      "user": "string"
    }
  ],
  "hba_version": "string",
  "settings_version": 0,
  "yaml": "string"
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "derived": [
    {
      "apply": "reload",
      "name": "string",
      "new": "string",
      "note": "string",
      "old": "string",
      "owner": "sized",
      "scope": "postgresql"
    }
  ],
  "errors": [
    "string"
  ],
  "hba": {
    "added": 0,
    "applied": [
      {
        "address": "string",
        "comment": "string",
        "database": "string",
        "method": "string",
        "type": "string",
        "user": "string"
      }
    ],
    "changed": 0,
    "errors": [
      "string"
    ],
    "removed": 0,
    "rules": [
      {
        "address": "string",
        "comment": "string",
        "database": "string",
        "errors": [
          "string"
        ],
        "line": 0,
        "method": "string",
        "type": "string",
        "user": "string",
        "warnings": [
          "string"
        ]
      }
    ],
    "warnings": [
      "string"
    ]
  },
  "leader_first": true,
  "pending_servers": [
    {
      "name": "string",
      "role": "string",
      "server_id": "string"
    }
  ],
  "restart": true,
  "restart_servers": [
    {
      "name": "string",
      "role": "string",
      "server_id": "string"
    }
  ],
  "rows": [
    {
      "apply": "reload",
      "errors": [
        "string"
      ],
      "leader_first": true,
      "line": 0,
      "name": "string",
      "new": "string",
      "new_owner": "override",
      "note": "string",
      "old": "string",
      "old_owner": "string",
      "reset_to": "string",
      "scope": "string",
      "warnings": [
        "string"
      ]
    }
  ],
  "settings_version": 0,
  "valid": true,
  "yaml_after": "string",
  "yaml_before": "string"
}
```
