# PostgreSQL 11

This page describes the Optimization Pack for the component type PostgreSQL 11.

## Metrics

### Concurrency

| Parameter       | Unit        | Description                          |
| --------------- | ----------- | ------------------------------------ |
| pg\_connections | connections | The number of connections in the db. |

### Transactions

| Parameter       | Unit        | Description                                          |
| --------------- | ----------- | ---------------------------------------------------- |
| pg\_start\_time | seconds     | The total amount time spent by postresql to boot up. |
| pg\_commits     | commits/s   | The number of transactions committed per second.     |
| pg\_rollbacks   | rollbacks/s | The number of transactions rollbacked per second.    |

### Checkpoints

| Parameter                | Unit          | Description                                                       |
| ------------------------ | ------------- | ----------------------------------------------------------------- |
| pg\_checkpoint\_executed | checkpoints/s | The total number of checkpoint operations executed by postgresql. |

### Disks

| Metric                    | Unit     | Description                                                           |
| ------------------------- | -------- | --------------------------------------------------------------------- |
| pg\_disk\_used            | bytes    | The amount of disk space used by postgresql.                          |
| pg\_blocks\_read          | blocks/s | The number of blocks read per second by postgresql.                   |
| pg\_blocks\_cache\_hit    | blocks/s | Number of blocks found in the buffer cache.                           |
| pg\_backend\_fsync\_count | syncs    | The total number of times postgresql executed a sync of data to disk. |

## Parameters

### Concurrency

| Parameter                      | Type    | Unit | Default value | Domain       | Restart | Description                                                                                |
| ------------------------------ | ------- | ---- | ------------- | ------------ | ------- | ------------------------------------------------------------------------------------------ |
| pg\_effective\_io\_concurrency | integer | iops | `1`           | `0` → `1000` | no      | The number of simultaneous requests that can be handled efficiently by the disk subsystem. |

### Background Writer

| Parameter                   | Type    | Unit         | Default value | Domain             | Restart | Description                                                                  |
| --------------------------- | ------- | ------------ | ------------- | ------------------ | ------- | ---------------------------------------------------------------------------- |
| pg\_bgwriter\_delay         | integer | milliseconds | `200`         | `10` → `10000`     | no      | The delay between activity rounds for the background writer.                 |
| pg\_bgwriter\_lru\_maxpages | integer | buffers      | `100`         | `0` → `1073741823` | no      | The maximum number of LRU pages to flush per round by the background writer. |

### Checkpoints

| Parameter                          | Type | Unit | Default value | Domain        | Restart | Description                                                                                  |
| ---------------------------------- | ---- | ---- | ------------- | ------------- | ------- | -------------------------------------------------------------------------------------------- |
| pg\_checkpoint\_completion\_target | real |      | `0.5`         | `0.0` → `1.0` | no      | The time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval. |

### Disks

| Parameter                  | Type    | Unit      | Default value |                    | Restart | Description                                                                                                                                                                                                                      |
| -------------------------- | ------- | --------- | ------------- | ------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| pg\_effective\_cache\_size | integer | kilobytes | `524288`      | `1` → `2147483647` | no      | The planner's assumption about the effective size of the disk cache available to a single query. A higher value makes it more likely index scans will be used, a lower value makes it more likely sequential scans will be used. |
