diff --git a/nixos/doc/manual/release-notes/rl-2105.xml b/nixos/doc/manual/release-notes/rl-2105.xml
index ce3cfc573dc..de64aa64bda 100644
--- a/nixos/doc/manual/release-notes/rl-2105.xml
+++ b/nixos/doc/manual/release-notes/rl-2105.xml
@@ -955,6 +955,11 @@ environment.systemPackages = [
boot.extraSystemdUnitPaths list.
+
+
+ PostgreSQL 9.5 is scheduled EOL during the 21.05 life cycle and has been removed.
+
+
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index ee8cdf2d285..fdc05312ece 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -295,8 +295,7 @@ in
# systems!
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.");
+ else throw "postgresql_9_5 was removed, please upgrade your postgresql version.");
services.postgresql.dataDir = mkDefault "/var/lib/postgresql/${cfg.package.psqlSchema}";
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix
index d3cc2304c63..35b46c673f8 100644
--- a/pkgs/servers/sql/postgresql/default.nix
+++ b/pkgs/servers/sql/postgresql/default.nix
@@ -191,15 +191,6 @@ let
in self: {
- postgresql_9_5 = self.callPackage generic {
- version = "9.5.25";
- psqlSchema = "9.5";
- sha256 = "00yny0sskxrqk4ji2phgv3iqxd1aiy6rh660k73s4s1pn9gcaa3n";
- this = self.postgresql_9_5;
- thisAttr = "postgresql_9_5";
- inherit self;
- };
-
postgresql_9_6 = self.callPackage generic {
version = "9.6.21";
psqlSchema = "9.6";
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index cb219cc84ed..e924f02d186 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -553,7 +553,6 @@ mapAliases ({
pmtools = acpica-tools; # added 2018-11-01
polarssl = mbedtls; # added 2018-04-25
poppler_qt5 = libsForQt5.poppler; # added 2015-12-19
- postgresql95 = postgresql_9_5;
postgresql96 = postgresql_9_6;
postgresql100 = throw "postgresql100 was deprecated on 2018-10-21: use postgresql_10 instead";
# postgresql plugins
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index d0a49403b0f..1d74e4db64f 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -18968,7 +18968,6 @@ in
timescaledb-tune = callPackage ../development/tools/database/timescaledb-tune { };
inherit (import ../servers/sql/postgresql pkgs)
- postgresql_9_5
postgresql_9_6
postgresql_10
postgresql_11