> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ClickHouse Cloud: Clickhouse Postgres Instance Config Post

> Replace Postgres service configuration. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Replace Postgres service configuration.

<Info>
  Tool ID: `clickhouse_postgres_instance_config_post`
</Info>

## Run this action

This action has conditional or dynamic input fields that cannot be represented by a reliable static example.

Inspect the live contract before executing it:

```bash theme={null}
deepline tools get clickhouse_postgres_instance_config_post --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "status": 123,
    "requestId": "123e4567-e89b-42d3-a456-426614174000"
  }
}
```

Use `deepline tools get clickhouse_postgres_instance_config_post --json` for the latest machine-readable contract.

## Input reference

**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. Replace the existing Postgres service and pgBouncer configuration.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.organizationId` | `string` | Yes | — | ID of the organization that owns the Postgres service. Format: `uuid`. |
| `payload.postgresId` | `string` | Yes | — | ID of the requested Postgres service. Format: `uuid`. |
| `payload.pgConfig` | `object` | Yes | — | Postgres [runtime configuration](https://www.postgresql.org/docs/current/runtime-config.html) configuration. |
| `payload.pgBouncerConfig` | `record` | Yes | — | PgBouncer [runtime configuration](https://www.pgbouncer.org/config.html) configuration. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. Replace the existing Postgres service and pgBouncer configuration.",
    "properties": {
      "organizationId": {
        "type": "string",
        "description": "ID of the organization that owns the Postgres service.",
        "format": "uuid"
      },
      "postgresId": {
        "type": "string",
        "description": "ID of the requested Postgres service.",
        "format": "uuid"
      },
      "pgConfig": {
        "type": "object",
        "description": "Postgres [runtime configuration](https://www.postgresql.org/docs/current/runtime-config.html) configuration.",
        "minProperties": 1,
        "properties": {
          "max_connections": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Sets the maximum number of concurrent connections to the database server.",
            "minimum": 1
          },
          "default_transaction_isolation": {
            "type": "string",
            "description": "Sets the default transaction isolation level for new transactions.",
            "enum": [
              "read committed",
              "repeatable read",
              "serializable"
            ]
          },
          "ssl_min_protocol_version": {
            "type": "string",
            "description": "Sets the minimum SSL/TLS protocol version allowed for client connections.",
            "enum": [
              "TLSv1",
              "TLSv1.1",
              "TLSv1.2",
              "TLSv1.3"
            ]
          },
          "maintenance_work_mem": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Sets the maximum memory to be used for maintenance operations.",
            "minimum": 64
          },
          "work_mem": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Sets the amount of memory Postgres will use for internal operations like sorting and hashing as part of executing a query.",
            "minimum": 64
          },
          "effective_cache_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Sets the planner's assumption about the total size of data caches.",
            "minimum": 8
          },
          "random_page_cost": {
            "type": [
              "string",
              "number"
            ],
            "description": "Sets the planner's estimate of the cost of a non-sequentially-fetched disk page. Lower values (1.1-1.5) are better for SSDs.",
            "minimum": 0
          },
          "effective_io_concurrency": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Number of concurrent disk I/O operations the planner expects. Higher values (100-200) benefit SSDs.",
            "minimum": 0
          },
          "max_worker_processes": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of background processes the system can support. Includes parallel query workers, logical replication, and more.",
            "minimum": 0
          },
          "max_parallel_workers": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of workers that can be used for parallel operations. Cannot exceed max_worker_processes.",
            "minimum": 0
          },
          "max_parallel_workers_per_gather": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of parallel workers per executor node for parallel queries. Use 0 to disable parallel queries.",
            "minimum": 0
          },
          "max_parallel_maintenance_workers": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of parallel workers for maintenance operations like CREATE INDEX and VACUUM.",
            "minimum": 0
          },
          "statement_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Abort any statement that runs longer than the specified time. Use 0 to disable.",
            "minimum": 0
          },
          "lock_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Abort any statement that waits longer than the specified time while attempting to acquire a lock. Use 0 to disable.",
            "minimum": 0
          },
          "idle_session_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Terminate any session that has been idle for longer than the specified time. Use 0 to disable.",
            "minimum": 0
          },
          "idle_in_transaction_session_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Terminate any session that has been idle within an open transaction for longer than the specified time. Use 0 to disable.",
            "minimum": 0
          },
          "transaction_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Terminate any statement that takes more than the specified time, even while active. Use 0 to disable.",
            "minimum": 0
          },
          "wal_sender_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Terminate replication connections that are inactive for longer than this time. Use 0 to disable.",
            "minimum": 0
          },
          "wal_keep_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Minimum size of past WAL files kept in pg_wal for standby servers. Use 0 to disable.",
            "minimum": 0
          },
          "min_wal_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Minimum size to shrink the WAL to. WAL files are recycled rather than removed when below this size.",
            "minimum": 32768
          },
          "max_wal_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum size WAL can grow between checkpoints. Larger values improve write performance but increase crash recovery time.",
            "minimum": 32768
          },
          "max_slot_wal_keep_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Specifies the maximum size of WAL files that replication slots are allowed to retain. Use -1 for unlimited.",
            "minimum": 0
          },
          "wal_compression": {
            "type": "string",
            "description": "Compress full-page writes in WAL. Reduces I/O at the cost of CPU. Options vary by PostgreSQL version.",
            "enum": [
              "off",
              "on",
              "lz4",
              "zstd"
            ]
          },
          "autovacuum_max_workers": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of autovacuum worker processes that can run at the same time. Workers share a single cost-limit budget, so raising this alone may not speed up vacuuming.",
            "minimum": 1
          },
          "autovacuum_naptime": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Minimum delay between autovacuum runs. Lower values make autovacuum check for work more frequently.",
            "minimum": 1
          },
          "autovacuum_work_mem": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum memory each autovacuum worker uses to track dead tuples. Higher values reduce repeated index-vacuum passes on large tables. Use -1 to fall back to maintenance_work_mem.",
            "minimum": 1024
          },
          "autovacuum_vacuum_scale_factor": {
            "type": [
              "string",
              "number"
            ],
            "description": "Fraction of a table's rows that must change before autovacuum runs. Lower values vacuum large tables more frequently.",
            "minimum": 0
          },
          "autovacuum_analyze_scale_factor": {
            "type": [
              "string",
              "number"
            ],
            "description": "Fraction of a table's rows that must change before autovacuum runs ANALYZE to refresh planner statistics.",
            "minimum": 0
          },
          "autovacuum_vacuum_insert_scale_factor": {
            "type": [
              "string",
              "number"
            ],
            "description": "Fraction of a table's rows that must be inserted before autovacuum runs. Helps vacuum insert-heavy, rarely-updated tables.",
            "minimum": 0
          },
          "autovacuum_vacuum_cost_limit": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Cost-accounting limit shared across all autovacuum workers before they pause. Use -1 to inherit vacuum_cost_limit.",
            "minimum": 1
          },
          "autovacuum_vacuum_cost_delay": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Time autovacuum sleeps when the cost limit is reached. Lower values speed up vacuuming at the cost of more I/O.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "pgBouncerConfig": {
        "type": "object",
        "description": "PgBouncer [runtime configuration](https://www.pgbouncer.org/config.html) configuration.",
        "minProperties": 1,
        "maxProperties": 64,
        "additionalProperties": {
          "type": "string",
          "description": "Any PgBouncer configuration parameter."
        }
      }
    },
    "required": [
      "organizationId",
      "postgresId",
      "pgConfig",
      "pgBouncerConfig"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.status` | `number` | No | — | HTTP status code. |
| `result.data.requestId` | `string` | No | — | Unique id assigned to every request. UUIDv4 Format: `uuid`. |
| `result.data.result` | `object` | No | — | — |
| `result.data.result.pgConfig` | `object` | Yes | — | Postgres [runtime configuration](https://www.postgresql.org/docs/current/runtime-config.html) configuration. |
| `result.data.result.pgConfig.max_connections` | `string \| integer` | No | — | Sets the maximum number of concurrent connections to the database server. Minimum: 1. |
| `result.data.result.pgConfig.default_transaction_isolation` | `"read committed" \| "repeatable read" \| "serializable"` | No | — | Sets the default transaction isolation level for new transactions. Allowed: `read committed`, `repeatable read`, `serializable`. |
| `result.data.result.pgConfig.ssl_min_protocol_version` | `"TLSv1" \| "TLSv1.1" \| "TLSv1.2" \| "TLSv1.3"` | No | — | Sets the minimum SSL/TLS protocol version allowed for client connections. Allowed: `TLSv1`, `TLSv1.1`, `TLSv1.2`, `TLSv1.3`. |
| `result.data.result.pgConfig.maintenance_work_mem` | `string \| integer` | No | — | Sets the maximum memory to be used for maintenance operations. Minimum: 64. |
| `result.data.result.pgConfig.work_mem` | `string \| integer` | No | — | Sets the amount of memory Postgres will use for internal operations like sorting and hashing as part of executing a query. Minimum: 64. |
| `result.data.result.pgConfig.effective_cache_size` | `string \| integer` | No | — | Sets the planner's assumption about the total size of data caches. Minimum: 8. |
| `result.data.result.pgConfig.random_page_cost` | `string \| number` | No | — | Sets the planner's estimate of the cost of a non-sequentially-fetched disk page. Lower values (1.1-1.5) are better for SSDs. Minimum: 0. |
| `result.data.result.pgConfig.effective_io_concurrency` | `string \| integer` | No | — | Number of concurrent disk I/O operations the planner expects. Higher values (100-200) benefit SSDs. Minimum: 0. |
| `result.data.result.pgConfig.max_worker_processes` | `string \| integer` | No | — | Maximum number of background processes the system can support. Includes parallel query workers, logical replication, and more. Minimum: 0. |
| `result.data.result.pgConfig.max_parallel_workers` | `string \| integer` | No | — | Maximum number of workers that can be used for parallel operations. Cannot exceed max\_worker\_processes. Minimum: 0. |
| `result.data.result.pgConfig.max_parallel_workers_per_gather` | `string \| integer` | No | — | Maximum number of parallel workers per executor node for parallel queries. Use 0 to disable parallel queries. Minimum: 0. |
| `result.data.result.pgConfig.max_parallel_maintenance_workers` | `string \| integer` | No | — | Maximum number of parallel workers for maintenance operations like CREATE INDEX and VACUUM. Minimum: 0. |
| `result.data.result.pgConfig.statement_timeout` | `string \| integer` | No | — | Abort any statement that runs longer than the specified time. Use 0 to disable. Minimum: 0. |
| `result.data.result.pgConfig.lock_timeout` | `string \| integer` | No | — | Abort any statement that waits longer than the specified time while attempting to acquire a lock. Use 0 to disable. Minimum: 0. |
| `result.data.result.pgConfig.idle_session_timeout` | `string \| integer` | No | — | Terminate any session that has been idle for longer than the specified time. Use 0 to disable. Minimum: 0. |
| `result.data.result.pgConfig.idle_in_transaction_session_timeout` | `string \| integer` | No | — | Terminate any session that has been idle within an open transaction for longer than the specified time. Use 0 to disable. Minimum: 0. |
| `result.data.result.pgConfig.transaction_timeout` | `string \| integer` | No | — | Terminate any statement that takes more than the specified time, even while active. Use 0 to disable. Minimum: 0. |
| `result.data.result.pgConfig.wal_sender_timeout` | `string \| integer` | No | — | Terminate replication connections that are inactive for longer than this time. Use 0 to disable. Minimum: 0. |
| `result.data.result.pgConfig.wal_keep_size` | `string \| integer` | No | — | Minimum size of past WAL files kept in pg\_wal for standby servers. Use 0 to disable. Minimum: 0. |
| `result.data.result.pgConfig.min_wal_size` | `string \| integer` | No | — | Minimum size to shrink the WAL to. WAL files are recycled rather than removed when below this size. Minimum: 32768. |
| `result.data.result.pgConfig.max_wal_size` | `string \| integer` | No | — | Maximum size WAL can grow between checkpoints. Larger values improve write performance but increase crash recovery time. Minimum: 32768. |
| `result.data.result.pgConfig.max_slot_wal_keep_size` | `string \| integer` | No | — | Specifies the maximum size of WAL files that replication slots are allowed to retain. Use -1 for unlimited. Minimum: 0. |
| `result.data.result.pgConfig.wal_compression` | `"off" \| "on" \| "lz4" \| "zstd"` | No | — | Compress full-page writes in WAL. Reduces I/O at the cost of CPU. Options vary by PostgreSQL version. Allowed: `off`, `on`, `lz4`, `zstd`. |
| `result.data.result.pgConfig.autovacuum_max_workers` | `string \| integer` | No | — | Maximum number of autovacuum worker processes that can run at the same time. Workers share a single cost-limit budget, so raising this alone may not speed up vacuuming. Minimum: 1. |
| `result.data.result.pgConfig.autovacuum_naptime` | `string \| integer` | No | — | Minimum delay between autovacuum runs. Lower values make autovacuum check for work more frequently. Minimum: 1. |
| `result.data.result.pgConfig.autovacuum_work_mem` | `string \| integer` | No | — | Maximum memory each autovacuum worker uses to track dead tuples. Higher values reduce repeated index-vacuum passes on large tables. Use -1 to fall back to maintenance\_work\_mem. Minimum: 1024. |
| `result.data.result.pgConfig.autovacuum_vacuum_scale_factor` | `string \| number` | No | — | Fraction of a table's rows that must change before autovacuum runs. Lower values vacuum large tables more frequently. Minimum: 0. |
| `result.data.result.pgConfig.autovacuum_analyze_scale_factor` | `string \| number` | No | — | Fraction of a table's rows that must change before autovacuum runs ANALYZE to refresh planner statistics. Minimum: 0. |
| `result.data.result.pgConfig.autovacuum_vacuum_insert_scale_factor` | `string \| number` | No | — | Fraction of a table's rows that must be inserted before autovacuum runs. Helps vacuum insert-heavy, rarely-updated tables. Minimum: 0. |
| `result.data.result.pgConfig.autovacuum_vacuum_cost_limit` | `string \| integer` | No | — | Cost-accounting limit shared across all autovacuum workers before they pause. Use -1 to inherit vacuum\_cost\_limit. Minimum: 1. |
| `result.data.result.pgConfig.autovacuum_vacuum_cost_delay` | `string \| integer` | No | — | Time autovacuum sleeps when the cost limit is reached. Lower values speed up vacuuming at the cost of more I/O. Minimum: 0. |
| `result.data.result.pgBouncerConfig` | `record` | Yes | — | PgBouncer [runtime configuration](https://www.pgbouncer.org/config.html) configuration. |
| `result.data.result.message` | `string` | No | — | Informational message about the configuration update, such as restart requirements. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<Info>
  This output schema is too large to embed without slowing the page. Get the complete live contract with `deepline tools get clickhouse_postgres_instance_config_post --json`.
</Info>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [ClickHouse Cloud provider guide](/docs/providers/clickhouse/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.