Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgresqlPackages.timescaledb: 2.14.2 -> 2.17.2; adopt, nixfmt; postgresqlPackages.timescaledb_toolkit: 1.18.0 -> 1.19.0 #348223

Merged
merged 7 commits into from
Nov 20, 2024
4 changes: 4 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

- `buildGoPackage` has been removed. Use `buildGoModule` instead. See the [Go section in the nixpkgs manual](https://nixos.org/manual/nixpkgs/unstable/#sec-language-go) for details.

- `timescaledb` requires manual upgrade steps.
After you run ALTER EXTENSION, you must run [this SQL script](https://github.com/timescale/timescaledb-extras/blob/master/utils/2.15.X-fix_hypertable_foreign_keys.sql). For more details, see the following pull requests [#6797](https://github.com/timescale/timescaledb/pull/6797).
PostgreSQL 13 is no longer supported in TimescaleDB v2.16.

- `kanata` was updated to v1.7.0, which introduces several breaking changes.
See the release notes of
[v1.7.0](https://github.com/jtroo/kanata/releases/tag/v1.7.0)
Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/tools/rust/cargo-pgrx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,11 @@ in
hash = "sha256-0m9oaqjU42RYyttkTihADDrRMjr2WoK/8sInZALeHws=";
cargoHash = "sha256-9XTIcpoCnROP63ZTDgMMMmj0kPggiTazKlKQfCgXKzk=";
};

cargo-pgrx_0_12_6 = generic {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we bump the alpha version above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks vector-rs I'll have a look into that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, bummer.
Nvm, you don't have to fix it up in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wonder what the removal policy for those is. cargo-pgrx_0_10_2 is now unused in nixpkgs, because timescaledb_toolkit was the last user. Should we remove it?

Furthermore.. cargo-pgrx is very specific to PostgreSQL and our package set, I wonder whether we should take responsibility for this with the @NixOS/postgres team as well? We could either just add to the OWNERS file directly - or move cargo-pgrx into the postgresql directory. Imho, that would be a much more specific location than tools/rust/....

Certainly out of scope here, just thinking about it while I build nixosTests.postgresql.timescaledb ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove it?

Go for it.
I wouldn't do it on stable, but that's not the case here.

I wonder whether we should take responsibility for this with the @NixOS/postgres team as well?

Sounds good. Do you want to file a PR for that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Do you want to file a PR for that?

Yeah, I can do that.

version = "0.12.6";
hash = "sha256-7aQkrApALZe6EoQGVShGBj0UIATnfOy2DytFj9IWdEA=";
cargoHash = "sha256-Di4UldQwAt3xVyvgQT1gUhdvYUVp7n/a72pnX45kP0w=";
};

}
38 changes: 26 additions & 12 deletions pkgs/servers/sql/postgresql/ext/timescaledb.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5, nixosTests, enableUnfree ? true, buildPostgresqlExtension }:
{
buildPostgresqlExtension,
cmake,
enableUnfree ? true,
fetchFromGitHub,
lib,
libkrb5,
nixosTests,
openssl,
postgresql,
stdenv,
}:

buildPostgresqlExtension rec {
pname = "timescaledb${lib.optionalString (!enableUnfree) "-apache"}";
version = "2.14.2";
version = "2.17.2";

nativeBuildInputs = [ cmake ];
buildInputs = [ openssl libkrb5 ];
buildInputs = [
openssl
libkrb5
];

src = fetchFromGitHub {
owner = "timescale";
repo = "timescaledb";
rev = version;
hash = "sha256-gJViEWHtIczvIiQKuvvuwCfWJMxAYoBhCHhD75no6r0=";
hash = "sha256-gPsAebMUBuAwP6Hoi9/vrc2IFsmTbL0wQH1g6/2k2d4=";
};

cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" "-DREGRESS_CHECKS=OFF" "-DTAP_CHECKS=OFF" ]
cmakeFlags =
[
"-DSEND_TELEMETRY_DEFAULT=OFF"
"-DREGRESS_CHECKS=OFF"
"-DTAP_CHECKS=OFF"
]
++ lib.optionals (!enableUnfree) [ "-DAPACHE_ONLY=ON" ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DLINTER=OFF" ];

Expand All @@ -38,14 +57,9 @@ buildPostgresqlExtension rec {
description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space";
homepage = "https://www.timescale.com/";
changelog = "https://github.com/timescale/timescaledb/blob/${version}/CHANGELOG.md";
maintainers = [ ];
maintainers = [ maintainers.kirillrdy ];
platforms = postgresql.meta.platforms;
license = with licenses; if enableUnfree then tsl else asl20;
broken = versionOlder postgresql.version "13" ||
# timescaledb supports PostgreSQL 17 from 2.17.0 on:
# https://github.com/timescale/timescaledb/releases/tag/2.17.0
# We can't upgrade to it, yet, because this would imply dropping support for
# PostgreSQL 13, which is a breaking change.
(versionAtLeast postgresql.version "17" && version == "2.14.2");
broken = versionOlder postgresql.version "14";
};
}
13 changes: 5 additions & 8 deletions pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
, buildPgrxExtension
, postgresql
, nixosTests
, cargo-pgrx_0_10_2
, cargo-pgrx_0_12_6
, nix-update-script
}:

(buildPgrxExtension.override { cargo-pgrx = cargo-pgrx_0_10_2; }) rec {
(buildPgrxExtension.override { cargo-pgrx = cargo-pgrx_0_12_6; }) rec {
inherit postgresql;

pname = "timescaledb_toolkit";
version = "1.18.0";
version = "1.19.0";

src = fetchFromGitHub {
owner = "timescale";
repo = "timescaledb-toolkit";
rev = version;
hash = "sha256-Lm/LFBkG91GeWlJL9RBqP8W0tlhBEeGQ6kXUzzv4xRE=";
hash = "sha256-7yUbtWbYL4AnuUX8OXG4OVqYCY2Lf0pISSTlcFdPqog=";
};

cargoHash = "sha256-LME8oftHmmiN8GU3eTBTSB6m0CE+KtDFRssL1g2Cjm8=";
cargoHash = "sha256-+uD4UU7QwNISQZ7a2kDkY/y3fQWk/K0fFcrFq4yq6RU=";
buildAndTestSubdir = "extension";

passthru = {
Expand All @@ -37,8 +37,5 @@
maintainers = with maintainers; [ typetetris ];
platforms = postgresql.meta.platforms;
license = licenses.tsl;
# PostgreSQL 17 support issue upstream: https://github.com/timescale/timescaledb-toolkit/issues/813
# Check after next package update.
broken = versionAtLeast postgresql.version "17" && version == "1.18.0";
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7007,6 +7007,7 @@ with pkgs;
cargo-pgrx_0_11_2
cargo-pgrx_0_11_3
cargo-pgrx_0_12_0_alpha_1
cargo-pgrx_0_12_6
;
cargo-pgrx = cargo-pgrx_0_11_2;

Expand Down