From fb863fceeace07cf4ce8632ccdce6f3614ff9a9d Mon Sep 17 00:00:00 2001 From: danbst Date: Sat, 21 Sep 2019 10:09:58 +0300 Subject: [PATCH 1/2] nixos/postgresql: switch default 9.6 -> 11 This is designed for 19.09 release. --- nixos/doc/manual/release-notes/rl-1909.xml | 7 +++++++ nixos/modules/services/databases/postgresql.nix | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml index 58ab7207f533..9aa992766a2f 100644 --- a/nixos/doc/manual/release-notes/rl-1909.xml +++ b/nixos/doc/manual/release-notes/rl-1909.xml @@ -33,6 +33,13 @@ PHP 7.1 is no longer supported due to upstream not supporting this version for the entire lifecycle of the 19.09 release. + + + Postgresql for NixOS service now defaults to v11. pkgs.postgresql is still 9.6, but + may be updated in future release. To prevent future update problems replace pkgs.postgresql + with an explicitly versioned pkgs.postgresql_9_6. + + The binfmt module is now easier to use. Additional systems can diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index 7bba4dacddcc..a19eb820a9c3 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -226,7 +226,8 @@ in # Note: when changing the default, make it conditional on # ‘system.stateVersion’ to maintain compatibility with existing # systems! - mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6 + mkDefault (if versionAtLeast config.system.stateVersion "19.09" then pkgs.postgresql_11 + else if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6 else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql_9_5 else throw "postgresql_9_4 was removed, please upgrade your postgresql version."); From e557ad74ac725a56d736a2f900495278770e8fad Mon Sep 17 00:00:00 2001 From: danbst Date: Sun, 22 Sep 2019 12:27:39 +0300 Subject: [PATCH 2/2] move from 19.09 to 20.03 --- nixos/doc/manual/release-notes/rl-1909.xml | 7 ------- nixos/doc/manual/release-notes/rl-2003.xml | 5 +++++ nixos/modules/services/databases/postgresql.nix | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml index 9aa992766a2f..58ab7207f533 100644 --- a/nixos/doc/manual/release-notes/rl-1909.xml +++ b/nixos/doc/manual/release-notes/rl-1909.xml @@ -33,13 +33,6 @@ PHP 7.1 is no longer supported due to upstream not supporting this version for the entire lifecycle of the 19.09 release. - - - Postgresql for NixOS service now defaults to v11. pkgs.postgresql is still 9.6, but - may be updated in future release. To prevent future update problems replace pkgs.postgresql - with an explicitly versioned pkgs.postgresql_9_6. - - The binfmt module is now easier to use. Additional systems can diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml index c84bc8dbb379..004a4135913d 100644 --- a/nixos/doc/manual/release-notes/rl-2003.xml +++ b/nixos/doc/manual/release-notes/rl-2003.xml @@ -23,6 +23,11 @@ Support is planned until the end of October 2020, handing over to 20.09. + + + Postgresql for NixOS service now defaults to v11. + + diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index a19eb820a9c3..3bedfe96a180 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -226,7 +226,7 @@ in # Note: when changing the default, make it conditional on # ‘system.stateVersion’ to maintain compatibility with existing # systems! - mkDefault (if versionAtLeast config.system.stateVersion "19.09" then pkgs.postgresql_11 + mkDefault (if versionAtLeast config.system.stateVersion "20.03" then pkgs.postgresql_11 else if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6 else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql_9_5 else throw "postgresql_9_4 was removed, please upgrade your postgresql version.");