| Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
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.
|
|
Resolves #61580
|
|
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
|
|
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
|
|
|
|
This was discussed and agreed on in [1].
[1]: https://github.com/NixOS/nixpkgs/pull/310580#discussion_r1597284693
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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).
|
|
No need to reference self here, because llvmPackages / stdenv' are available
in that scope anyway. Pure refactor, derivations don't change.
|
|
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.
|
|
Seems to have been put in the wrong place.
|
|
This reverts commit 2ed47724a666d908a671e1acdbddc85cc79fa249.
|
|
Changelog: https://www.postgresql.org/docs/release/16.2/
|
|
Changelog: https://www.postgresql.org/docs/release/15.6/
|
|
Changelog: https://www.postgresql.org/docs/release/14.11/
|
|
Changelog: https://www.postgresql.org/docs/release/13.14/
|
|
Changelog: https://www.postgresql.org/docs/release/12.18/
|
|
|
|
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
|
|
|
|
These patches are already included in the latest release.
This reverts commit 8fbd381b8a46988b8e183a3fdd56091b07f26d3a.
|
|
Changelog: https://www.postgresql.org/docs/release/16.1/
|
|
Changelog: https://www.postgresql.org/docs/release/15.5/
|
|
Changelog: https://www.postgresql.org/docs/release/14.10/
|
|
Changelog: https://www.postgresql.org/docs/release/13.13/
|
|
Changelog: https://www.postgresql.org/docs/release/12.17/
|
|
|
|
|
|
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/
|
|
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
|
|
|
|
postgresql: update extensions
|
|
This also adds support for building postgresql 15 and 16 under musl.
|
|
PostgreSQL changed the extension of its extensions in Darwin to use .dylib [1]
[1] https://github.com/postgres/postgres/commit/b55f62abb2c2e07dfae99e19a2b3d7ca9e58dc1a
|
|
|
|
|
|
|
|
https://www.postgresql.org/docs/release/15.4/
|
|
https://www.postgresql.org/docs/release/14.9/
|
|
https://www.postgresql.org/docs/release/13.12/
|
|
https://www.postgresql.org/docs/release/12.16/
|
|
https://www.postgresql.org/docs/release/11.21/
|
|
pkgsMusl.postgresql: fix build
|
|
|