From 098c158dafa2d2a591a1c69a460c31cbbfd8d96f Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Sat, 9 Sep 2023 18:11:51 +0100 Subject: [PATCH] postgresql: default to v15 in 23.11 --- nixos/doc/manual/release-notes/rl-2311.section.md | 2 ++ nixos/modules/services/databases/postgresql.nix | 3 ++- pkgs/top-level/all-packages.nix | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 37225b5506913..ef12e4e2134c0 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -4,6 +4,8 @@ - FoundationDB now defaults to major version 7. +- PostgreSQL now defaults to major version 15. + - Support for WiFi6 (IEEE 802.11ax) and WPA3-SAE-PK was enabled in the `hostapd` package, along with a significant rework of the hostapd module. - LXD now supports virtual machine instances to complement the existing container support diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index 0acaf0fd00a67..eb0d72b51864e 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -451,7 +451,8 @@ in services.postgresql.package = let mkThrow = ver: throw "postgresql_${ver} was removed, please upgrade your postgresql version."; - base = if versionAtLeast config.system.stateVersion "22.05" then pkgs.postgresql_14 + base = if versionAtLeast config.system.stateVersion "23.11" then pkgs.postgresql_15 + else if versionAtLeast config.system.stateVersion "22.05" then pkgs.postgresql_14 else if versionAtLeast config.system.stateVersion "21.11" then pkgs.postgresql_13 else if versionAtLeast config.system.stateVersion "20.03" then pkgs.postgresql_11 else if versionAtLeast config.system.stateVersion "17.09" then mkThrow "9_6" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1636309a6d43c..25eb857a8d171 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27300,14 +27300,14 @@ with pkgs; postgresql_15_jit postgresql_16_jit ; - postgresql = postgresql_14.override { this = postgresql; }; - postgresql_jit = postgresql_14_jit.override { this = postgresql_jit; }; + postgresql = postgresql_15.override { this = postgresql; }; + postgresql_jit = postgresql_15_jit.override { this = postgresql_jit; }; postgresqlPackages = recurseIntoAttrs postgresql.pkgs; postgresqlJitPackages = recurseIntoAttrs postgresql_jit.pkgs; postgresql11Packages = recurseIntoAttrs postgresql_11.pkgs; postgresql12Packages = recurseIntoAttrs postgresql_12.pkgs; postgresql13Packages = recurseIntoAttrs postgresql_13.pkgs; - postgresql15Packages = recurseIntoAttrs postgresql_15.pkgs; + postgresql14Packages = recurseIntoAttrs postgresql_14.pkgs; postgresql16Packages = recurseIntoAttrs postgresql_16.pkgs; postgresql11JitPackages = recurseIntoAttrs postgresql_11_jit.pkgs; postgresql12JitPackages = recurseIntoAttrs postgresql_12_jit.pkgs; @@ -27315,7 +27315,7 @@ with pkgs; postgresql14JitPackages = recurseIntoAttrs postgresql_14_jit.pkgs; postgresql15JitPackages = recurseIntoAttrs postgresql_15_jit.pkgs; postgresql16JitPackages = recurseIntoAttrs postgresql_16_jit.pkgs; - postgresql14Packages = postgresqlPackages; + postgresql15Packages = postgresqlPackages; postgresql_jdbc = callPackage ../development/java-modules/postgresql_jdbc { };