Skip to content

postgresqlPackages.timescaledb_toolkit: run post-install script - #413622

Merged
wolfgangwalther merged 1 commit into
NixOS:masterfrom
syvb:sv/toolkit-post-install
Jun 10, 2025
Merged

postgresqlPackages.timescaledb_toolkit: run post-install script#413622
wolfgangwalther merged 1 commit into
NixOS:masterfrom
syvb:sv/toolkit-post-install

Conversation

@syvb

@syvb syvb commented Jun 3, 2025

Copy link
Copy Markdown
Member

Currently users of the postgresXXPackages.timescaledb_toolkit package can't update the extension (without dropping/creating it). This is because Toolkit has a post-install script that creates the update scripts, which isn't currently being run. This PR makes nixpkgs run Toolkit's post-install script.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@wolfgangwalther wolfgangwalther changed the title timescaledb_toolkit: run post-install script postgresqlPackages.timescaledb_toolkit: run post-install script Jun 7, 2025
@wolfgangwalther

wolfgangwalther commented Jun 7, 2025

Copy link
Copy Markdown
Contributor

Please rebase to trigger the flaky CI again and change the commit's prefix according to the PR title change I made. This will make ofborg pick up the right package to build and test.

A general question: Is this post-install script to generate the migration script a timescaledb_toolkit specific thing - or is this something that all cargo-pgrx extensions need to do? If the latter, we need to change it in buildPgrxExtension instead. Edit: Ah, I was looking in the wrong repo. I found tools/post-install in the timescaledb_toolkit repo now, so it is indeed specific to that.

@syvb
syvb force-pushed the sv/toolkit-post-install branch from 99207e4 to 4183008 Compare June 10, 2025 00:23
@github-actions github-actions Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jun 10, 2025
@nix-owners
nix-owners Bot requested a review from typetetris June 10, 2025 00:29
@wolfgangwalther

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 413622
Commit: 4183008322cc90e445af9e05fb50b9c1783d999d


x86_64-linux

✅ 3 packages built:
  • postgresql15Packages.timescaledb_toolkit
  • postgresql16Packages.timescaledb_toolkit
  • postgresqlPackages.timescaledb_toolkit (postgresql17Packages.timescaledb_toolkit)

aarch64-linux

✅ 3 packages built:
  • postgresql15Packages.timescaledb_toolkit
  • postgresql16Packages.timescaledb_toolkit
  • postgresqlPackages.timescaledb_toolkit (postgresql17Packages.timescaledb_toolkit)

@wolfgangwalther
wolfgangwalther merged commit 109c4eb into NixOS:master Jun 10, 2025
2 of 4 checks passed
@wolfgangwalther

Copy link
Copy Markdown
Contributor

Thank you!

@kirillrdy

Copy link
Copy Markdown
Member

bisect shows that this breaks nix-build -A postgresqlPackages.timescaledb.tests

@wolfgangwalther

Copy link
Copy Markdown
Contributor

Just came to the same conclusion without bisecting ;)

It seems like after this change the .so file is now versioned. And the passthru test tries to load timescaledb_toolkit.so in shared_preload_libraries. It doesn't need to do so to pass the test, though.

Not sure whether loading this as a shared_preload_library ever made sense.

@wolfgangwalther

Copy link
Copy Markdown
Contributor

Seems like loading this as shared_preload has been introduced in #186276, but I can't find any discussion about that. Probably wasn't needed from the start, so I'd say we just remove that. We still do CREATE EXTENSION timescaledb_toolkit which should be enough. I don't think the timescaledb_toolkit extension is actually one that needs to be preloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants