---
title: "PostgreSQL Configuration Parameters"
description: "Names, types, ranges and restart behavior of the PostgreSQL parameters Managed PostgreSQL accepts in the pg settings namespace."
url: https://community.exoscale.com/product/dbaas/service-specific/postgresql/reference/configuration-parameters/
product: "PostgreSQL"
section: product
last_updated: 2026-11-10
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# PostgreSQL Configuration Parameters

This page lists the PostgreSQL server parameters a Managed PostgreSQL service accepts, with their type, their accepted values and whether changing them restarts the service.

> [!NOTE]
> The tables below were generated from the settings catalog on 2026-11-10. The catalog is the
> contract the API enforces and can change. Regenerate or check them with:
>
> ```bash
> exo api get-dbaas-settings-pg -z ch-gva-2 -q 'settings.pg.properties'
> ```
>
> `exo dbaas type show pg --settings pg` prints the same keys with their descriptions, but shows the
> `autovacuum`, `bg-writer` and `wal` groups as a single `object` row each.

What each parameter does is described in the
[PostgreSQL documentation](https://www.postgresql.org/docs/current/runtime-config.html) ↗. Values use
the unit stated in the catalog description, which can differ from the unit `pg_settings` shows: the
catalog takes `max_stack_depth` in bytes, for example. The value in force on a service is what
`SHOW PARAMETER_NAME;` returns, and it does not always match the default quoted in the catalog
description: `autovacuum_analyze_scale_factor` is described with a default of `0.2` and runs at `0.1`.

## Set a Parameter

Managed PostgreSQL has no `postgresql.conf` you can edit and no `ALTER SYSTEM`, because `avnadmin`
is not a superuser. Set parameters on the service:

```bash
exo dbaas update SERVICE_NAME -z ZONE -f --pg-settings='JSON_OBJECT'
```

Parameters:

- `SERVICE_NAME`: name of the Managed PostgreSQL service.
- `ZONE`: zone the service runs in, for example `ch-gva-2`.
- `JSON_OBJECT`: a JSON object whose keys are parameter names from the tables below.

For example:

```bash
exo dbaas update my-postgresql -z ch-gva-2 -f \
  --pg-settings='{"log_min_duration_statement":500,"track_io_timing":"on"}'
```

Without `-f`, the command asks for confirmation and, in a script or any other non-interactive shell,
exits with status 1 after printing `EOF`, without applying anything.

Values must match the declared type: integers unquoted, booleans as `true` or `false`, strings
quoted. `track_io_timing` and `track_commit_timestamp` are strings that take `"on"` or `"off"`; a JSON
boolean is rejected with `Invalid type. Expected: string, given: boolean`. `jit` is a real boolean.

Each update is merged into the stored settings: keys you leave out keep their value. The complete
procedure is in
[Configure PostgreSQL settings](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/configure-settings/index.md).

> [!IMPORTANT]
> `exo dbaas update --pg-settings` leaves out keys whose value is `0`. Alone, such a key fails with
> `No data to update the service`; inside a group it is skipped without an error. Set a `0` with the
> API: `echo '{"pg-settings":{"KEY":0}}' | exo api update-dbaas-service-pg SERVICE_NAME -z ZONE`.

## Parameters That Restart the Service

The **Restart** column marks the parameters whose catalog description ends with
`Changing this parameter causes a service restart.` A restart drops every open connection,
including those of [connection pools](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/manage-connection-pools/index.md),
so apply these changes in a window you control.

From inside the database, `pg_settings` shows which parameters need a server restart to change
(`context` is `postmaster`):

```sql
SELECT name, setting, context FROM pg_settings WHERE context = 'postmaster' ORDER BY name;
```

On PostgreSQL 18, `autovacuum_max_workers` has the context `sighup`: changing it applies with a
configuration reload, even though the catalog marks it as restarting the service.

## PostgreSQL Parameters

| Parameter | Type | Allowed values | Restart |
| --- | --- | --- | --- |
| `deadlock_timeout` | integer | `500` to `1800000` |  |
| `default_toast_compression` | string | `lz4`, `pglz` |  |
| `idle_in_transaction_session_timeout` | integer | `0` to `604800000` |  |
| `io_combine_limit` | integer | `1` to `32` |  |
| `io_max_combine_limit` | integer | `1` to `128` | yes |
| `io_max_concurrency` | integer | `-1` to `1024` | yes |
| `io_method` | string | `worker`, `sync`, `io_uring` | yes |
| `io_workers` | integer | `1` to `32` |  |
| `jit` | boolean | `true`, `false` |  |
| `log_error_verbosity` | string | `TERSE`, `DEFAULT`, `VERBOSE` |  |
| `log_line_prefix` | string | `'pid=%p,user=%u,db=%d,app=%a,client=%h '`, `'pid=%p,user=%u,db=%d,app=%a,client=%h,txid=%x,qid=%Q '`, `'%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h '`, `'%m [%p] %q[user=%u,db=%d,app=%a] '` |  |
| `log_min_duration_statement` | integer | `-1` to `86400000` |  |
| `log_temp_files` | integer | `-1` to `2147483647` |  |
| `max_files_per_process` | integer | `1000` to `4096` | yes |
| `max_locks_per_transaction` | integer | `64` to `6400` | yes |
| `max_logical_replication_workers` | integer | `4` to `256` | yes |
| `max_parallel_workers` | integer | `0` to `96` |  |
| `max_parallel_workers_per_gather` | integer | `0` to `96` |  |
| `max_pred_locks_per_transaction` | integer | `64` to `5120` | yes |
| `max_prepared_transactions` | integer | `0` to `10000` | yes |
| `max_replication_slots` | integer | `8` to `256` | yes |
| `max_stack_depth` | integer | `2097152` to `6291456` |  |
| `max_standby_archive_delay` | integer | `1` to `43200000` |  |
| `max_standby_streaming_delay` | integer | `1` to `43200000` |  |
| `max_sync_workers_per_subscription` | integer | `2` to `8` |  |
| `max_worker_processes` | integer | `8` to `288` | yes |
| `password_encryption` | string | `md5`, `scram-sha-256` |  |
| `pg_partman_bgw.interval` | integer | `3600` to `604800` |  |
| `pg_partman_bgw.role` | string | up to 64 characters |  |
| `pg_stat_monitor.pgsm_enable_query_plan` | boolean | `true`, `false` |  |
| `pg_stat_monitor.pgsm_max_buckets` | integer | `1` to `10` | yes |
| `pg_stat_statements.track` | string | `all`, `top`, `none` |  |
| `temp_file_limit` | integer | `-1` to `2147483647` |  |
| `timezone` | string | up to 64 characters |  |
| `track_activity_query_size` | integer | `1024` to `10240` | yes |
| `track_commit_timestamp` | string | `off`, `on` | yes |
| `track_functions` | string | `all`, `pl`, `none` |  |
| `track_io_timing` | string | `off`, `on` |  |

Two more keys appear in the catalog but cannot be set:

- `synchronous_commit`: `exo dbaas update` drops it without a message, and the API answers
  `No data to update the service`. It is `off` on Managed PostgreSQL, where upstream PostgreSQL
  defaults to `on`. Its context is `user`, so `avnadmin` can change it for a session, a role or a
  database with `SET`, `ALTER ROLE ... SET` or `ALTER DATABASE ... SET`. See
  [High availability](https://community.exoscale.com/product/dbaas/service-specific/postgresql/overview/high-availability/index.md).
- `pg_stat_plans.track`: the API answers `Settings: ["pg_stat_plans.track"] not valid`.
  `CREATE EXTENSION pg_stat_plans` succeeds, but querying its view fails with
  `pg_stat_plans must be loaded via "shared_preload_libraries"`.

The `pg_stat_monitor.*` parameters are accepted, but the `pg_stat_monitor` module is not loaded, so
they have no effect: querying the view of the extension fails with
`Must be loaded via shared_preload_libraries`.

The `io_*` parameters are marked `EXPERIMENTAL` in the catalog. `io_combine_limit` requires
PostgreSQL 17 or later, the four others PostgreSQL 18 or later. The catalog description of
`io_method` repeats the one of `io_max_concurrency`; `io_method` selects the asynchronous I/O
implementation. Measure the effect of a change on a
[fork](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/fork-a-service/index.md) before applying it to a
production service.

## Grouped Parameters

Three groups, `autovacuum`, `bg-writer` and `wal`, are nested objects inside the `pg` namespace.
Set them as nested JSON:

```bash
exo dbaas update my-postgresql -z ch-gva-2 -f \
  --pg-settings='{"autovacuum":{"autovacuum_naptime":30,"autovacuum_vacuum_scale_factor":0.05},"wal":{"wal_sender_timeout":120000}}'
```

> [!WARNING]
> The group key is `bg-writer`, with a hyphen, while the parameters inside it are named
> `bgwriter_*`. `bgwriter` as a group key is rejected with
> `Additional property bgwriter is not allowed`.

Read the stored groups back with
`exo api get-dbaas-service-pg my-postgresql -z ch-gva-2 -q '"pg-settings"'`, then check the value in
force with `SHOW`.

### `autovacuum`

| Parameter | Type | Allowed values | Restart |
| --- | --- | --- | --- |
| `autovacuum_analyze_scale_factor` | number | `0` to `1` |  |
| `autovacuum_analyze_threshold` | integer | `0` to `2147483647` |  |
| `autovacuum_freeze_max_age` | integer | `200000000` to `1500000000` | yes |
| `autovacuum_max_workers` | integer | `1` to `20` | yes |
| `autovacuum_naptime` | integer | `1` to `86400` |  |
| `autovacuum_vacuum_cost_delay` | integer | `-1` to `100` |  |
| `autovacuum_vacuum_cost_limit` | integer | `-1` to `10000` |  |
| `autovacuum_vacuum_scale_factor` | number | `0` to `1` |  |
| `autovacuum_vacuum_threshold` | integer | `0` to `2147483647` |  |
| `log_autovacuum_min_duration` | integer | `-1` to `2147483647` |  |

A per-table storage parameter often fits better than a service-wide change, because it targets
the one table that needs it:

```sql
ALTER TABLE events SET (autovacuum_vacuum_scale_factor = 0.01, autovacuum_vacuum_threshold = 5000);
```

Raising `autovacuum_freeze_max_age` postpones the anti-wraparound vacuum. Watch the transaction ID
age as described in
[Monitor a Managed PostgreSQL service](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/monitor-your-service/index.md#watch-transaction-id-age).

### `bg-writer`

| Parameter | Type | Allowed values | Restart |
| --- | --- | --- | --- |
| `bgwriter_delay` | integer | `10` to `10000` |  |
| `bgwriter_flush_after` | integer | `0` to `2048` |  |
| `bgwriter_lru_maxpages` | integer | `0` to `1073741823` |  |
| `bgwriter_lru_multiplier` | number | `0` to `10` |  |

On PostgreSQL 17 and later, the checkpoint counters are in `pg_stat_checkpointer` rather than in
`pg_stat_bgwriter`.

### `wal`

| Parameter | Type | Allowed values | Restart |
| --- | --- | --- | --- |
| `max_slot_wal_keep_size` | integer | `-1` to `2147483647` |  |
| `max_wal_senders` | integer | `20` to `256` | yes |
| `wal_sender_timeout` | integer | `0` to `10800000` |  |
| `wal_writer_delay` | integer | `10` to `200` |  |

`max_slot_wal_keep_size` is `-1` on a new service: an inactive replication slot can then retain
write-ahead log without limit and fill the disk. Set a bound in megabytes so that such a slot is
invalidated instead:

```bash
exo dbaas update my-postgresql -z ch-gva-2 -f \
  --pg-settings='{"wal":{"max_slot_wal_keep_size":10240}}'
```

See [Prevent a full disk](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/prevent-full-disk/index.md).
The platform's WAL archiver uses one WAL sender and appears in `pg_stat_replication` as `pghoard`.

## Related Pages

- [Configure PostgreSQL settings](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/configure-settings/index.md)
- [PgBouncer, pglookout and TimescaleDB parameters](https://community.exoscale.com/product/dbaas/service-specific/postgresql/reference/pgbouncer-parameters/index.md)
- [Log formats and log retrieval](https://community.exoscale.com/product/dbaas/service-specific/postgresql/reference/log-formats/index.md)
- [Prevent a full disk](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/prevent-full-disk/index.md)
- [API reference for DBaaS](https://community.exoscale.com/reference/api/dbaas/dbaas-postgresql/index.md)

