Merge pull request #264250 from Ma27/rm-postgres-11

postgresql_11: remove
This commit is contained in:
Mario Rodas 2023-10-30 21:36:56 -05:00 committed by GitHub
commit 1122fb5123
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 29 additions and 93 deletions

View File

@ -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).

View File

@ -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";

View File

@ -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";

View File

@ -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

View File

@ -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;
}

View File

@ -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 = [

View File

@ -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";

View File

@ -6,7 +6,6 @@ let
"14" = "sha256-w93Q499sZRk4q85A9yqKQjGUd9Pl8UL8K1D3W7mHRTU=";
"13" = "sha256-Sot7FR0oW7kWA680pNCMCmlflu4RfJTSWZn9mrXrpzw=";
"12" = "sha256-XezcXoHHLCD1/2OHmKhxome2pdjOsYAfZlpvOoU3aS4=";
"11" = "sha256-ZkNAIMO69BxF3knQ+jcUBVuDgcoZXZccF5O+acpZ81M=";
};
in
stdenv.mkDerivation rec {

View File

@ -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 {

View File

@ -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 {

View File

@ -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";
};
}

View File

@ -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 { };

View File

@ -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;