summaryrefslogtreecommitdiff
path: root/pkgs/servers/sql/postgresql/default.nix
AgeCommit message (Collapse)Author
2025-11-18postgresql_13: drop as it's EOLLeona Maroni
2025-07-05postgresql_18: init at 18beta1Kamil Monicz
2025-04-05postgresql: always build with JIT enabledWolfgang Walther
This changes the build to always enable JIT - but to only enable it at run-time, when required. This keeps the runtime closure small without JIT, but allows enabling it without a rebuild. We can do this, because JIT is actually built as a shared module, which is loaded at run-time. We put it into a -jit output and only link it into the environment when requested. Under the hood, this uses withPackages and adds the "JIT package" - thus, to be able to use withPackages on top of that, we also need to be able to apply withPackages repeatedly. This cuts down the number of NixOS tests in half, because we don't need to run it for every version with and without JIT anymore. There really is no point in running everything with llvmjit.so in place, when the queries are not making use of it anyway. Also, we only need to build each extension once and not twice, further reducing the number of rebuilds required for PRs touching postgresql.
2025-01-26postgresql: refactor `postgresqlVersions` attribute & testsMaximilian Bosch
Every postgresql testcase essentially does the following things: * Filter `postgresqlVersions` for server packages * Filter postgresql server packages for suitable ones (i.e. extensions must support the given version) * Generate an attribute-set of testcases The first item became necessary in 7ab1e888334ddc2745b285e3df0b0efd5839d0f8 given that `postgresql/default.nix` now exposes JIT and non-JIT servers AND a `libpq` that is not suitable for the tests here. This changes restructures this a little bit, i.e.: * Having an attribute-set that contains a bunch of postgresql servers and a single client package seems odd (and the sole consumer of `postgresqlVersions` in nixpkgs, the test suite, has to take that into account). Hence, postgresql's default.nix now provides `libpq` (the client) and a `postgresqlVersions` attribute with all supported JIT and non-JIT variants of postgresql. * Each test-case gets a third argument, a function called `genTests`: this function sets `recurseForDerivations = true;` and generates an attribute-set of tests for each postgresql version given a function that returns a testcase or multiple test-cases (`makeTestFor`). The argument to `makeTestFor` is a postgresql server package. This function also accepts a filter predicate that is passed against `filterAttrs` to remove postgresql server packages that are not suitable for the test (e.g. because the version isn't supported by the extension to test). I checked by making sure that the `.drv` doesn't change on staging with this change on top for postgresq, postgresql-jit, postgresql-wal-receiver, postgresql-tls-client-cert, anonymizer, pgjwt, pgvecto-rs, timescaledb, tsja and wal2json.
2025-01-19libpq: init at 17.2Wolfgang Walther
Resolves #61580
2024-12-10treewide: format all inactive Nix filesSilvan Mosberger
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \ --argstr baseRev 57b193d8ddeaf4f5219d2bae1d23b081e4906e57 result/bin/apply-formatting $NIXPKGS_PATH
2024-11-15postgresql_12: removeMaximilian Bosch
This will be EOL at the end of November, so there's little reason to keep it in 24.11[1]. As discussed, we'd like to keep it for as long as possible to make sure there's a state in nixpkgs that has the latest minor of postgresql_12 available with the most recent CVEs fixed for people who cannot upgrade[2]. This aspect has been made explicit in the manual now for the next .11 release. During the discussions it has been brought up that if people just do `services.postgresql.enable = true;` and let the code decide the postgresql version based on `system.stateVersion`, there's a chance that such EOL dates will be missed. To make this harder, a warning will now be raised when using the stateVersion-condition and the oldest still available major is selected. Additionally regrouped the postgresql things in the release notes to make sure these are all shown consecutively. Otherwise it's a little hard to keep track of all the changes made to postgresql in 24.11. [1] https://endoflife.date/postgresql [2] https://github.com/NixOS/nixpkgs/pull/353158#issuecomment-2453056692
2024-10-26postgresql_17: init at 17.0Wolfgang Walther
2024-06-14postgresql: add readme with eol-policyWolfgang Walther
This was discussed and agreed on in [1]. [1]: https://github.com/NixOS/nixpkgs/pull/310580#discussion_r1597284693
2024-04-04postgresql: remove thisAttr argument by calling tests directlyWolfgang Walther
Previously, it was not possible to run tests on an overridden derivation, because the derivation under test was always pulled from pkgs. With this change, the following will return the same test: postgresql_jit.tests and (postgresql.override { jitSupport = true; }).tests
2024-03-15postgresql: refactor to remove "this" argumentWolfgang Walther
This was proposed by abbradar in #150801, but left out of the follow up PR #221851 by Ma27 to reduce the size of the diff. Compared to the initial proposal this includes the callPackage call in the recursion, which avoids breaking the withJIT/withoutJIT helpers. In terms of nixpkgs, this is a pure refactor, no derivations change. However, this makes downstream expressions like the following possible: (postgresql.override { jitSupport = true; }).pkgs.postgis This would have not worked before without passing another "this" argument, which is error prone as can be seen in this example: https://github.com/PostgREST/postgrest/pull/3222/files
2024-03-15postgresql: refactor mkPackages in default.nixWolfgang Walther
Refactors some low hanging fruit in default.nix to make it easier to add new versions later on. Pure refactor, not changing any derivations. This change makes it easier to add new versions in default.nix without messing up - and also prevents us from adding version-specific arguments in default.nix by accident in the future. Those should be put in the versioned .nix files instead.
2024-03-15postgresql: refactor to split up default.nix (2/2)Wolfgang Walther
The recommended [1] structure for a package regarding versioning is to have each version in a separate file. This commit just mechanically copies code around without any changes. Pure refactor, not changing any derivations. [1]: pkgs/README.md
2024-03-15postgresql: refactor to split up default.nix (1/2)Wolfgang Walther
This just renames default.nix to generic.nix, because the biggest chunk of code should move that way in the next commit. This gives us a much better diff for the next commit and makes rebasing **much** easier in case of changes. This commit does not stand on its own and needs to go in with the next commit (2/2).
2024-03-15postgresql: refactor to remove useless references to "self"Wolfgang Walther
No need to reference self here, because llvmPackages / stdenv' are available in that scope anyway. Pure refactor, derivations don't change.
2024-03-15postgresql: refactor to move packages.nix to ext/default.nix (1/2)Wolfgang Walther
This commit is split up into two commits to allow git to detect renames, make rebasing easier and allow a working entry in .git-blame-ignore-revs. To allow bisecting we allow evaluation on every commit by moving the extensions into ext/ext/ first and back to ext/ with the next commit.
2024-03-15postgresql: refactor to move locale-binary-path.patch into patches/Wolfgang Walther
Seems to have been put in the wrong place.
2024-02-08Revert "postgresql: Fix build with libxml2 2.12"Mario Rodas
This reverts commit 2ed47724a666d908a671e1acdbddc85cc79fa249.
2024-02-08postgresql_16: 16.1 -> 16.2Mario Rodas
Changelog: https://www.postgresql.org/docs/release/16.2/
2024-02-08postgresql_15: 15.5 -> 15.6Mario Rodas
Changelog: https://www.postgresql.org/docs/release/15.6/
2024-02-08postgresql_14: 14.10 -> 14.11Mario Rodas
Changelog: https://www.postgresql.org/docs/release/14.11/
2024-02-08postgresql_13: 13.13 -> 13.14Mario Rodas
Changelog: https://www.postgresql.org/docs/release/13.14/
2024-02-08postgresql_12: 12.17 -> 12.18Mario Rodas
Changelog: https://www.postgresql.org/docs/release/12.18/
2024-01-12postgresql: add support to PL/PythonMario Rodas
2023-12-26postgresql: Fix build with libxml2 2.12Jan Tojnar
libxml 2.12.0 made the error argument of xmlStructuredErrorFunc const resulting in -Wincompatible-function-pointer-types error with CLang 16 and GCC 14. https://gitlab.gnome.org/GNOME/libxml2/-/commit/61034116d0a3c8b295c6137956adc3ae55720711
2023-12-12postgresql: add pam support on linuxArnar Gauti Ingason
2023-11-12postgresql_jit: fix buildMario Rodas
These patches are already included in the latest release. This reverts commit 8fbd381b8a46988b8e183a3fdd56091b07f26d3a.
2023-11-10postgresql_16: 16.0 -> 16.1Mario Rodas
Changelog: https://www.postgresql.org/docs/release/16.1/
2023-11-10postgresql_15: 15.4 -> 15.5Mario Rodas
Changelog: https://www.postgresql.org/docs/release/15.5/
2023-11-10postgresql_14: 14.9 -> 14.10Mario Rodas
Changelog: https://www.postgresql.org/docs/release/14.10/
2023-11-10postgresql_13: 13.12 -> 13.13Mario Rodas
Changelog: https://www.postgresql.org/docs/release/13.13/
2023-11-10postgresql_12: 12.16 -> 12.17Mario Rodas
Changelog: https://www.postgresql.org/docs/release/12.17/
2023-11-10postgresql: add changelog to metaMario Rodas
2023-10-31Merge master into staging-nextgithub-actions[bot]
2023-10-30postgresql_11: removeMaximilian Bosch
As described in the release lifecycle docs from postgresql[1], v11 will stop receiving fixes as of Nov 9 2023. This means it's EOL throughout the entire lifetime of 23.11, so let's drop it now. A lot of examples are also referencing postgresql_11. Where it's sensible, use postgresql_15 as example now to avoid confusion. This is also handy because the LLVM 16 fix for postgresql is not available for postgresql 11 ;-) [1] https://www.postgresql.org/support/versioning/
2023-10-29postgresql_jit: fix buildMaximilian Bosch
Failing Hydra build: https://hydra.nixos.org/build/239477682/nixlog/1 This got fixed upstream already in the release branches, applying the patches here solves the issue. This skips v11 since there's no patch available and it will be dropped soon anyways[1]. [1] #264250
2023-10-16postgresql: Add `meta.pkgConfigModules` and testMeet Barot
2023-10-10Merge pull request #259734 from marsam/postgresql-update-extensionsMario Rodas
postgresql: update extensions
2023-10-10postgresql: reorganize musl patches (#260067)Yureka
This also adds support for building postgresql 15 and 16 under musl.
2023-09-22postgresql: add dlSuffix to passthruMario Rodas
PostgreSQL changed the extension of its extensions in Darwin to use .dylib [1] [1] https://github.com/postgres/postgres/commit/b55f62abb2c2e07dfae99e19a2b3d7ca9e58dc1a
2023-09-16postgresql_16: init at 16.0Steve Purcell
2023-08-19Merge master into staging-nextgithub-actions[bot]
2023-08-18postgresql: fix musl patchesSean D Gillespie
2023-08-10postgresql_15: 15.3 -> 15.4ajs124
https://www.postgresql.org/docs/release/15.4/
2023-08-10postgresql_14: 14.8 -> 14.9ajs124
https://www.postgresql.org/docs/release/14.9/
2023-08-10postgresql_13: 13.11 -> 13.12ajs124
https://www.postgresql.org/docs/release/13.12/
2023-08-10postgresql_12: 12.15 -> 12.16ajs124
https://www.postgresql.org/docs/release/12.16/
2023-08-10postgresql_11: 11.20 -> 11.21ajs124
https://www.postgresql.org/docs/release/11.21/
2023-06-07Merge pull request #228349 from yu-re-ka/musl-postgresqlMaximilian Bosch
pkgsMusl.postgresql: fix build
2023-05-28pkgsMusl.postgresql: fix buildYureka