Merge pull request #148360 from helsinki-systems/drop/pg96

postgresql_9_6: drop
This commit is contained in:
Maximilian Bosch 2021-12-06 21:57:05 +01:00 committed by GitHub
commit c959de5b30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 17 deletions

View file

@ -9,7 +9,7 @@ containers.database =
{ config =
{ config, pkgs, ... }:
{ services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql_9_6;
services.postgresql.package = pkgs.postgresql_10;
};
};
```

View file

@ -11,7 +11,7 @@ containers.database =
{ config =
{ config, pkgs, ... }:
{ services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql_9_6;
services.postgresql.package = pkgs.postgresql_10;
};
};
</programlisting>

View file

@ -289,14 +289,16 @@ in
port = cfg.port;
};
services.postgresql.package =
services.postgresql.package = let
mkThrow = ver: throw "postgresql_${ver} was removed, please upgrade your postgresql version.";
in
# Note: when changing the default, make it conditional on
# system.stateVersion to maintain compatibility with existing
# systems!
mkDefault (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 pkgs.postgresql_9_6
else throw "postgresql_9_5 was removed, please upgrade your postgresql version.");
else if versionAtLeast config.system.stateVersion "17.09" then mkThrow "9_6"
else mkThrow "9_5");
services.postgresql.dataDir = mkDefault "/var/lib/postgresql/${cfg.package.psqlSchema}";

View file

@ -716,9 +716,9 @@ in
{ config =
{ config, pkgs, ... }:
{ services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql_9_6;
services.postgresql.package = pkgs.postgresql_10;
system.stateVersion = "17.03";
system.stateVersion = "21.05";
};
};
}

View file

@ -201,15 +201,6 @@ let
in self: {
postgresql_9_6 = self.callPackage generic {
version = "9.6.24";
psqlSchema = "9.6";
sha256 = "sha256-rrehlr4+vtGnR271ZfOXIhh8EI3UfadIm+nE/K6YKs4=";
this = self.postgresql_9_6;
thisAttr = "postgresql_9_6";
inherit self;
};
postgresql_10 = self.callPackage generic {
version = "10.19";
psqlSchema = "10.0"; # should be 10, but changing it is invasive

View file

@ -721,6 +721,7 @@ mapAliases ({
polarssl = mbedtls; # added 2018-04-25
poppler_qt5 = libsForQt5.poppler; # added 2015-12-19
postgresql96 = postgresql_9_6;
postgresql_9_6 = throw "postgresql_9_6 has been removed from nixpkgs, as this version is no longer supported by upstream"; # added 2021-12-03
# postgresql plugins
pgjwt = postgresqlPackages.pgjwt;
pg_repack = postgresqlPackages.pg_repack;

View file

@ -21359,7 +21359,6 @@ with pkgs;
timescaledb-tune = callPackage ../development/tools/database/timescaledb-tune { };
inherit (import ../servers/sql/postgresql pkgs)
postgresql_9_6
postgresql_10
postgresql_11
postgresql_12