Skip to content

chore: add timescaledb 2.9.1; wrappers upgrade fix; wrappers & plv8 naming fix #1259

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

Merged
merged 25 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7e2735f
fix (15.6): wrappers for pg_upgrade
pcnc Oct 1, 2024
1022585
fix: account for `public` grantee
soedirgo Sep 26, 2024
b13bea9
fix(ci): respect postgresVersion input (#1237)
soedirgo Sep 26, 2024
c31f5a3
feat: bump gotrue version to v2.162.0 (#1241)
kangmingtay Sep 28, 2024
853ab55
fix: only grant pg_read_all_data if it exists (#1242)
soedirgo Sep 30, 2024
23f5c7e
chore: workflow fix
pcnc Oct 1, 2024
989415b
Merge branch 'release/15.6' into pcnc/wrappers-15.6
pcnc Oct 2, 2024
5e986bb
fix: collision when patching wrappers lib locations for upgrades
pcnc Oct 2, 2024
481f1da
Merge branch 'release/15.6' into pcnc/wrappers-15.6
pcnc Oct 3, 2024
be24e6a
chore: timescaledb 2.9.1
pcnc Oct 4, 2024
c73ab37
feat: bump auth 2.162.1 on 15.6 (#1256)
hf Oct 3, 2024
32f076d
fix(15.6): disable pg_stat_monitor (#1260)
pcnc Oct 4, 2024
dd8b87a
Merge branch 'release/15.6' into pcnc/wrappers-15.6
pcnc Oct 4, 2024
aebbd63
Merge branch 'timescaledb-2.9.1' into pcnc/15.6-test
pcnc Oct 14, 2024
a46c06d
fix: rm version num from plv8 lib
samrose Oct 8, 2024
17f9019
feat: post build rename .so file and edit sql to point to new name
samrose Oct 4, 2024
94b89a3
chore: wrappers lib rename
samrose Oct 4, 2024
fa488e9
chore: bump pg version
pcnc Oct 14, 2024
697fc6d
fix: paths
pcnc Oct 14, 2024
ed36aa1
fix: wrappers; plv8; backwards compat
pcnc Oct 14, 2024
7cb3e6e
chore: stop patching wrappers
pcnc Oct 14, 2024
55397c3
chore: bump pg version
pcnc Oct 14, 2024
7fa1ba4
chore: remove unneeded variable
pcnc Oct 14, 2024
2537aa0
fix: remove timescaledb 2.9.1 control file
pcnc Oct 15, 2024
1fac4f2
chore: fix interface
pcnc Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
ourExtensions = [
./nix/ext/rum.nix
./nix/ext/timescaledb.nix
./nix/ext/timescaledb-2.9.1.nix
./nix/ext/pgroonga.nix
./nix/ext/index_advisor.nix
./nix/ext/wal2json.nix
Expand Down
51 changes: 51 additions & 0 deletions nix/ext/timescaledb-2.9.1.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5 }:

stdenv.mkDerivation rec {
pname = "timescaledb-apache";
version = "2.9.1";

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

src = fetchFromGitHub {
owner = "timescale";
repo = "timescaledb";
rev = version;
hash = "sha256-fvVSxDiGZAewyuQ2vZDb0I6tmlDXl6trjZp8+qDBtb8=";
};

cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" "-DREGRESS_CHECKS=OFF" "-DTAP_CHECKS=OFF" "-DAPACHE_ONLY=1" ]
++ lib.optionals stdenv.isDarwin [ "-DLINTER=OFF" ];

# Fix the install phase which tries to install into the pgsql extension dir,
# and cannot be manually overridden. This is rather fragile but works OK.
postPatch = ''
for x in CMakeLists.txt sql/CMakeLists.txt; do
substituteInPlace "$x" \
--replace 'DESTINATION "''${PG_SHAREDIR}/extension"' "DESTINATION \"$out/share/postgresql/extension\""
done

for x in src/CMakeLists.txt src/loader/CMakeLists.txt tsl/src/CMakeLists.txt; do
substituteInPlace "$x" \
--replace 'DESTINATION ''${PG_PKGLIBDIR}' "DESTINATION \"$out/lib\""
done
'';


# timescaledb-2.9.1.so already exists in the lib directory
# we have no need for the timescaledb.so or control file
postInstall = ''
rm $out/lib/timescaledb.so
mv $out/share/postgresql/extension/timescaledb.control $out/share/postgresql/extension/timescaledb-2.9.1.control
'';

meta = with lib; {
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 = with maintainers; [ samrose ];
platforms = postgresql.meta.platforms;
license = licenses.asl20;
broken = versionOlder postgresql.version "13";
};
}
7 changes: 4 additions & 3 deletions nix/tests/expected/extensions_sql_interface.out
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ where
installed_version is null
order by
name asc;
name
---------
name
-------------------
pg_cron
(1 row)
timescaledb-2.9.1
(2 rows)

/*

Expand Down
Loading