# server_version_num

> server_version_num — Shows the server version as an integer. Observed in PG9.0–19 Beta 3; its last measured boot default is 190000 in PG19 Beta 3, with internal context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Shows the server version as an integer.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `integer` | Upstream pg_settings type |
| Context | `internal` | Internal/preset and not user-settable |
| Unit | — | Raw unit |
| Range | `190000` – `190000` | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Preset Options | Upstream classification |
| Latest boot value | `190000` | 190000 |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG9.0 | `90023` | — | 90023 |
| PG9.1 | `90124` | — | 90124 |
| PG9.2 | `90223` | — | 90223 |
| PG9.3 | `90325` | — | 90325 |
| PG9.4 | `90426` | — | 90426 |
| PG9.5 | `90525` | — | 90525 |
| PG9.6 | `90624` | — | 90624 |
| PG10 | `100023` | — | 100023 |
| PG11 | `110022` | — | 110022 |
| PG12 | `120022` | — | 120022 |
| PG13 | `130023` | — | 130023 |
| PG14 | `140024` | — | 140024 |
| PG15 | `150019` | — | 150019 |
| PG16 | `160015` | — | 160015 |
| PG17 | `170011` | — | 170011 |
| PG18 | `180006` | — | 180006 |
| PG19 Beta 3 | `190000` | — | 190000 |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

Reports the running server binary’s version as an integer. It is internal/read-only and is determined by the binary, not by initdb or database creation.

For the measured PG9.0–19 Beta 3 releases, the integer encodes the major version and minor update so software can make numeric feature/version comparisons without parsing vendor text from server_version.

Use it for compatibility gating only when server-side feature discovery is unavailable. Extensions and clients must still account for vendor backports that do not change the upstream version number.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| OLTP | Not tunable. Record it from every server after upgrade and use numeric comparisons in deployment checks; changing it means running a different PostgreSQL binary. |
| OLAP | Verify coordinator, workers, replicas, and extension builds against the actual server version before enabling version-specific SQL or planner features. |
| Small nodes | Use the value for simple compatibility checks, but prefer probing the required feature. Do not attempt to alter it through configuration or initdb. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

| Template | Effective value | Versus upstream boot | Source expression |
| --- | --- | --- | --- |
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Comparing the integer as a string.
- Trying to change it with configuration or by recreating a database.
- Assuming the number captures vendor backports and downstream patches.
- Using a client-library version as a substitute for the connected server version.

## Related parameters {#related-parameters}

[`server_version`](/parameters/server-version/) · [`server_encoding`](/parameters/server-encoding/) · [`integer_datetimes`](/parameters/integer-datetimes/) · [`ssl_library`](/parameters/ssl-library/) · [`max_identifier_length`](/parameters/max-identifier-length/) · [`block_size`](/parameters/block-size/)

## References {#references}

- [PostgreSQL 19 Beta 3 — server_version_num](https://www.postgresql.org/docs/19/runtime-config-preset.html#GUC-SERVER-VERSION-NUM)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
