Skip to content

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

Type , Valueinteger
Upstream pg_settings type
Context , Valueinternal
Internal/preset and not user-settable
Unit , Value
Raw unit
Range , Value190000190000
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValuePreset Options
Upstream classification
Latest boot value , Value190000
190000

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

Measured PG9.0–19 Beta 3 boot defaults
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

How it works

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

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.

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
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

  • 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.

server_version · server_encoding · integer_datetimes · ssl_library · max_identifier_length · block_size

References