diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-10-30 21:36:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-30 21:36:56 -0500 |
commit | 1122fb5123f67437e6811bfbf3cfb1600de81c40 (patch) | |
tree | 51f8d61118cbe6c06a460f45c3677acd99e9aa76 | |
parent | b84c09e767c4c6baae37aee40d6e247b4defe3ac (diff) | |
parent | 279cecf6b748294be69fa1f38627f146252afb9e (diff) |
Merge pull request #264250 from Ma27/rm-postgres-11
postgresql_11: remove
-rw-r--r-- | nixos/doc/manual/release-notes/rl-2311.section.md | 2 | ||||
-rw-r--r-- | nixos/modules/services/backup/postgresql-wal-receiver.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/databases/postgresql.md | 32 | ||||
-rw-r--r-- | nixos/modules/services/databases/postgresql.nix | 10 | ||||
-rw-r--r-- | nixos/tests/postgresql.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/misc/glom/default.nix | 5 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/default.nix | 11 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/age.nix | 1 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix | 4 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/pgaudit.nix | 4 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/pipelinedb.nix | 39 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/packages.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
13 files changed, 29 insertions, 93 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 74d29ab1cf9ca..dc8f989c686f5 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -488,6 +488,8 @@ The module update takes care of the new config syntax and the data itself (user If you use this feature, updates to CoreDNS may require updating `vendorHash` by following these steps again. +- `postgresql_11` has been removed since it'll stop receiving fixes on November 9 2023. + - `ffmpeg` default upgraded from `ffmpeg_5` to `ffmpeg_6`. - `fusuma` now enables the following plugins: [appmatcher](https://github.com/iberianpig/fusuma-plugin-appmatcher), [keypress](https://github.com/iberianpig/fusuma-plugin-keypress), [sendkey](https://github.com/iberianpig/fusuma-plugin-sendkey), [tap](https://github.com/iberianpig/fusuma-plugin-tap) and [wmctrl](https://github.com/iberianpig/fusuma-plugin-wmctrl). diff --git a/nixos/modules/services/backup/postgresql-wal-receiver.nix b/nixos/modules/services/backup/postgresql-wal-receiver.nix index 01fd57f5c5062..773dc0ba447dd 100644 --- a/nixos/modules/services/backup/postgresql-wal-receiver.nix +++ b/nixos/modules/services/backup/postgresql-wal-receiver.nix @@ -7,7 +7,7 @@ let options = { postgresqlPackage = mkOption { type = types.package; - example = literalExpression "pkgs.postgresql_11"; + example = literalExpression "pkgs.postgresql_15"; description = lib.mdDoc '' PostgreSQL package to use. ''; @@ -124,7 +124,7 @@ in { example = literalExpression '' { main = { - postgresqlPackage = pkgs.postgresql_11; + postgresqlPackage = pkgs.postgresql_15; directory = /mnt/pg_wal/main/; slot = "main_wal_receiver"; connection = "postgresql://user@somehost"; diff --git a/nixos/modules/services/databases/postgresql.md b/nixos/modules/services/databases/postgresql.md index 4d66ee38be426..e4b679a3eee00 100644 --- a/nixos/modules/services/databases/postgresql.md +++ b/nixos/modules/services/databases/postgresql.md @@ -17,9 +17,9 @@ PostgreSQL is an advanced, free relational database. To enable PostgreSQL, add the following to your {file}`configuration.nix`: ``` services.postgresql.enable = true; -services.postgresql.package = pkgs.postgresql_11; +services.postgresql.package = pkgs.postgresql_15; ``` -Note that you are required to specify the desired version of PostgreSQL (e.g. `pkgs.postgresql_11`). Since upgrading your PostgreSQL version requires a database dump and reload (see below), NixOS cannot provide a default value for [](#opt-services.postgresql.package) such as the most recent release of PostgreSQL. +Note that you are required to specify the desired version of PostgreSQL (e.g. `pkgs.postgresql_15`). Since upgrading your PostgreSQL version requires a database dump and reload (see below), NixOS cannot provide a default value for [](#opt-services.postgresql.package) such as the most recent release of PostgreSQL. <!-- After running {command}`nixos-rebuild`, you can verify @@ -119,27 +119,27 @@ A complete list of options for the PostgreSQL module may be found [here](#opt-se ## Plugins {#module-services-postgres-plugins} -Plugins collection for each PostgreSQL version can be accessed with `.pkgs`. For example, for `pkgs.postgresql_11` package, its plugin collection is accessed by `pkgs.postgresql_11.pkgs`: +Plugins collection for each PostgreSQL version can be accessed with `.pkgs`. For example, for `pkgs.postgresql_15` package, its plugin collection is accessed by `pkgs.postgresql_15.pkgs`: ```ShellSession $ nix repl '<nixpkgs>' Loading '<nixpkgs>'... Added 10574 variables. -nix-repl> postgresql_11.pkgs.<TAB><TAB> -postgresql_11.pkgs.cstore_fdw postgresql_11.pkgs.pg_repack -postgresql_11.pkgs.pg_auto_failover postgresql_11.pkgs.pg_safeupdate -postgresql_11.pkgs.pg_bigm postgresql_11.pkgs.pg_similarity -postgresql_11.pkgs.pg_cron postgresql_11.pkgs.pg_topn -postgresql_11.pkgs.pg_hll postgresql_11.pkgs.pgjwt -postgresql_11.pkgs.pg_partman postgresql_11.pkgs.pgroonga +nix-repl> postgresql_15.pkgs.<TAB><TAB> +postgresql_15.pkgs.cstore_fdw postgresql_15.pkgs.pg_repack +postgresql_15.pkgs.pg_auto_failover postgresql_15.pkgs.pg_safeupdate +postgresql_15.pkgs.pg_bigm postgresql_15.pkgs.pg_similarity +postgresql_15.pkgs.pg_cron postgresql_15.pkgs.pg_topn +postgresql_15.pkgs.pg_hll postgresql_15.pkgs.pgjwt +postgresql_15.pkgs.pg_partman postgresql_15.pkgs.pgroonga ... ``` To add plugins via NixOS configuration, set `services.postgresql.extraPlugins`: ``` -services.postgresql.package = pkgs.postgresql_11; -services.postgresql.extraPlugins = with pkgs.postgresql_11.pkgs; [ +services.postgresql.package = pkgs.postgresql_12; +services.postgresql.extraPlugins = with pkgs.postgresql_12.pkgs; [ pg_repack postgis ]; @@ -148,7 +148,7 @@ services.postgresql.extraPlugins = with pkgs.postgresql_11.pkgs; [ You can build custom PostgreSQL-with-plugins (to be used outside of NixOS) using function `.withPackages`. For example, creating a custom PostgreSQL package in an overlay can look like: ``` self: super: { - postgresql_custom = self.postgresql_11.withPackages (ps: [ + postgresql_custom = self.postgresql_12.withPackages (ps: [ ps.pg_repack ps.postgis ]); @@ -158,9 +158,9 @@ self: super: { Here's a recipe on how to override a particular plugin through an overlay: ``` self: super: { - postgresql_11 = super.postgresql_11.override { this = self.postgresql_11; } // { - pkgs = super.postgresql_11.pkgs // { - pg_repack = super.postgresql_11.pkgs.pg_repack.overrideAttrs (_: { + postgresql_15 = super.postgresql_15.override { this = self.postgresql_15; } // { + pkgs = super.postgresql_15.pkgs // { + pg_repack = super.postgresql_15.pkgs.pg_repack.overrideAttrs (_: { name = "pg_repack-v20181024"; src = self.fetchzip { url = "https://github.com/reorg/pg_repack/archive/923fa2f3c709a506e111cc963034bf2fd127aa00.tar.gz"; diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index 2d4ef05631823..21e6a60e32a35 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -55,7 +55,7 @@ in package = mkOption { type = types.package; - example = literalExpression "pkgs.postgresql_11"; + example = literalExpression "pkgs.postgresql_15"; description = lib.mdDoc '' PostgreSQL package to use. ''; @@ -78,7 +78,7 @@ in dataDir = mkOption { type = types.path; defaultText = literalExpression ''"/var/lib/postgresql/''${config.services.postgresql.package.psqlSchema}"''; - example = "/var/lib/postgresql/11"; + example = "/var/lib/postgresql/15"; description = lib.mdDoc '' The data directory for PostgreSQL. If left as the default value this directory will automatically be created before the PostgreSQL server starts, otherwise @@ -387,7 +387,7 @@ in extraPlugins = mkOption { type = types.listOf types.path; default = []; - example = literalExpression "with pkgs.postgresql_11.pkgs; [ postgis pg_repack ]"; + example = literalExpression "with pkgs.postgresql_15.pkgs; [ postgis pg_repack ]"; description = lib.mdDoc '' List of PostgreSQL plugins. PostgreSQL version for each plugin should match version for `services.postgresql.package` value. @@ -399,7 +399,7 @@ in default = {}; description = lib.mdDoc '' PostgreSQL configuration. Refer to - <https://www.postgresql.org/docs/11/config-setting.html#CONFIG-SETTING-CONFIGURATION-FILE> + <https://www.postgresql.org/docs/15/config-setting.html#CONFIG-SETTING-CONFIGURATION-FILE> for an overview of `postgresql.conf`. ::: {.note} @@ -461,7 +461,7 @@ in 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 "20.03" then mkThrow "11" else if versionAtLeast config.system.stateVersion "17.09" then mkThrow "9_6" else mkThrow "9_5"; in diff --git a/nixos/tests/postgresql.nix b/nixos/tests/postgresql.nix index b44849e0a14e5..c0dd24cf6ad2e 100644 --- a/nixos/tests/postgresql.nix +++ b/nixos/tests/postgresql.nix @@ -219,8 +219,6 @@ let in concatMapAttrs (name: package: { ${name} = make-postgresql-test name package false; + ${name + "-backup-all"} = make-postgresql-test "${name + "-backup-all"}" package true; ${name + "-clauses"} = mk-ensure-clauses-test name package; }) postgresql-versions - // { - postgresql_11-backup-all = make-postgresql-test "postgresql_11-backup-all" postgresql-versions.postgresql_11 true; - } diff --git a/pkgs/applications/misc/glom/default.nix b/pkgs/applications/misc/glom/default.nix index 363e6fadee41a..5c8eb94712a68 100644 --- a/pkgs/applications/misc/glom/default.nix +++ b/pkgs/applications/misc/glom/default.nix @@ -28,7 +28,7 @@ , isocodes , gtksourceview , gtksourceviewmm -, postgresql_11 +, postgresql_15 , gobject-introspection , yelp-tools , wrapGAppsHook @@ -93,7 +93,7 @@ in stdenv.mkDerivation rec { python3.pkgs.pygobject3 gtksourceview gtksourceviewmm - postgresql_11 # for pg_config + postgresql_15 # for postgresql utils ]; enableParallelBuilding = true; @@ -102,6 +102,7 @@ in stdenv.mkDerivation rec { configureFlags = [ "--with-boost-python=boost_python${lib.versions.major python3.version}${lib.versions.minor python3.version}" + "--with-postgres-utils=${lib.getBin postgresql_15}/bin" ]; makeFlags = [ diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 6bf881d52815e..427a394873fae 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -344,17 +344,6 @@ let }; mkPackages = self: { - # TODO: remove ahead of 23.11 branchoff - # "PostgreSQL 11 will stop receiving fixes on November 9, 2023" - postgresql_11 = self.callPackage generic { - version = "11.21"; - psqlSchema = "11.1"; # should be 11, but changing it is invasive - hash = "sha256-B7CDdHHV3XeyUWazRxjzuhCBa2rWHmkeb8VHzz/P+FA="; - this = self.postgresql_11; - thisAttr = "postgresql_11"; - inherit self; - }; - postgresql_12 = self.callPackage generic { version = "12.16"; psqlSchema = "12"; diff --git a/pkgs/servers/sql/postgresql/ext/age.nix b/pkgs/servers/sql/postgresql/ext/age.nix index c0de0c30d5a7b..3a1c1c8388bee 100644 --- a/pkgs/servers/sql/postgresql/ext/age.nix +++ b/pkgs/servers/sql/postgresql/ext/age.nix @@ -6,7 +6,6 @@ let "14" = "sha256-w93Q499sZRk4q85A9yqKQjGUd9Pl8UL8K1D3W7mHRTU="; "13" = "sha256-Sot7FR0oW7kWA680pNCMCmlflu4RfJTSWZn9mrXrpzw="; "12" = "sha256-XezcXoHHLCD1/2OHmKhxome2pdjOsYAfZlpvOoU3aS4="; - "11" = "sha256-ZkNAIMO69BxF3knQ+jcUBVuDgcoZXZccF5O+acpZ81M="; }; in stdenv.mkDerivation rec { diff --git a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix index d0cf1193fb56d..afc5b9fe65065 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix @@ -22,10 +22,6 @@ let version = "1.3.9"; hash = "sha256-64/dlm6e4flCxMQ8efsxfKSlja+Tko0zsghTgLatN+Y="; }; - "11" = { - version = "1.3.9"; - hash = "sha256-8t/HhB/2Kjx4xMItmmKv3g9gba5VCBHdplYtYD/3UhA="; - }; }.${lib.versions.major postgresql.version} or (throw "Source for pg_hint_plan is not available for ${postgresql.version}"); in stdenv.mkDerivation { diff --git a/pkgs/servers/sql/postgresql/ext/pgaudit.nix b/pkgs/servers/sql/postgresql/ext/pgaudit.nix index 188451f1b8849..f4c03d611f503 100644 --- a/pkgs/servers/sql/postgresql/ext/pgaudit.nix +++ b/pkgs/servers/sql/postgresql/ext/pgaudit.nix @@ -22,10 +22,6 @@ let version = "1.4.3"; hash = "sha256-c8/xUFIHalu2bMCs57DeylK0oW0VnQwmUCpdp+tYqk4="; }; - "11" = { - version = "1.3.4"; - hash = "sha256-UEnwD36ejeYWyKRHZ4mPt6/Ru76Gy8s/rgIvmgermiM="; - }; }.${lib.versions.major postgresql.version} or (throw "Source for pgaudit is not available for ${postgresql.version}"); in stdenv.mkDerivation { diff --git a/pkgs/servers/sql/postgresql/ext/pipelinedb.nix b/pkgs/servers/sql/postgresql/ext/pipelinedb.nix deleted file mode 100644 index 6403138fd7047..0000000000000 --- a/pkgs/servers/sql/postgresql/ext/pipelinedb.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, zeromq, openssl, libsodium, libkrb5 }: - -stdenv.mkDerivation rec { - pname = "pipelinedb"; - version = "1.0.0-13"; - - src = fetchFromGitHub { - owner = "pipelinedb"; - repo = pname; - rev = version; - sha256 = "1mnqpvx6g1r2n4kjrrx01vbdx7kvndfsbmm7zbzizjnjlyixz75f"; - }; - - buildInputs = [ postgresql openssl zeromq libsodium libkrb5 ]; - - makeFlags = [ "USE_PGXS=1" ]; - - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lsodium"; - - preConfigure = '' - substituteInPlace Makefile \ - --replace "/usr/lib/libzmq.a" "${zeromq}/lib/libzmq.a" - ''; - - installPhase = '' - mkdir -p $out/bin - install -D -t $out/lib/ pipelinedb.so - install -D -t $out/share/postgresql/extension {pipelinedb-*.sql,pipelinedb.control} - ''; - - meta = with lib; { - description = "High-performance time-series aggregation for PostgreSQL"; - homepage = "https://www.pipelinedb.com/"; - license = licenses.asl20; - platforms = postgresql.meta.platforms; - maintainers = [ maintainers.marsam ]; - broken = versions.major postgresql.version != "11"; - }; -} diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/packages.nix index d9d9ce8b09d98..09cba4ea81aa8 100644 --- a/pkgs/servers/sql/postgresql/packages.nix +++ b/pkgs/servers/sql/postgresql/packages.nix @@ -56,8 +56,6 @@ self: super: { pgtap = super.callPackage ./ext/pgtap.nix { }; - pipelinedb = super.callPackage ./ext/pipelinedb.nix { }; - smlar = super.callPackage ./ext/smlar.nix { }; temporal_tables = super.callPackage ./ext/temporal_tables.nix { }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 18e843038e0a0..656bdf3a21d38 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27080,14 +27080,12 @@ with pkgs; timescaledb-tune = callPackage ../development/tools/database/timescaledb-tune { }; inherit (import ../servers/sql/postgresql pkgs) - postgresql_11 postgresql_12 postgresql_13 postgresql_14 postgresql_15 postgresql_16 - postgresql_11_jit postgresql_12_jit postgresql_13_jit postgresql_14_jit @@ -27098,12 +27096,10 @@ with pkgs; 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; postgresql14Packages = recurseIntoAttrs postgresql_14.pkgs; postgresql16Packages = recurseIntoAttrs postgresql_16.pkgs; - postgresql11JitPackages = recurseIntoAttrs postgresql_11_jit.pkgs; postgresql12JitPackages = recurseIntoAttrs postgresql_12_jit.pkgs; postgresql13JitPackages = recurseIntoAttrs postgresql_13_jit.pkgs; postgresql14JitPackages = recurseIntoAttrs postgresql_14_jit.pkgs; |