Commit Graph

1452 Commits

Author SHA1 Message Date
Wolfgang Walther
a5c41ae80a
postgresqlPackages.pgvecto-rs: make passthru.tests work with correct package
Same reasoning as commit before.
2024-11-09 18:24:51 +01:00
Wolfgang Walther
0af934adf7
postgresqlPackages.pgjwt: make passthru.tests work with correct package
Same reasoning as commit before.
2024-11-09 18:24:51 +01:00
Wolfgang Walther
ecffab1fda
postgresqlPackages.postgis: move nixosTests.postgis into package
Same reasoning as commit before.
2024-11-09 18:24:51 +01:00
Wolfgang Walther
aded718a98
postgresqlPackages.apache_datasketches: move nixosTests.apache_datasketches into package
There is no need to fire up a whole VM just to run a two line test of
creating the extension. We can use postgresqlTestExtension for that.
This has the advantage that it runs with postgresqlTestHook, so without
a VM, making it more portable.
2024-11-09 18:24:51 +01:00
Wolfgang Walther
139c546676
postgresql: add passthru.tests.postgresql-tls-client-cert
Same reasoning as commit before.
2024-11-09 18:24:51 +01:00
Wolfgang Walther
f6c2de9262
postgresql: add passthru.tests.postgresql
Restructuring the nixosTests.postgresql test a little bit to allow
calling it with the specific versioned package from generic.nix.
2024-11-09 18:24:51 +01:00
Wolfgang Walther
319d82d5c2
nixosTests.postgresql-wal2json: avoid manual imports
Same reasoning as commit before.
2024-11-09 18:24:51 +01:00
Wolfgang Walther
65ef7381c8
nixosTests.postgresql-jit: avoid manual imports
Same reasoning as commit before.
2024-11-09 18:24:50 +01:00
Wolfgang Walther
a1ae4377e0
nixosTests.postgresql-wal-receiver: avoid manual imports
Manually importing postgresql packages from the /pkgs/ folder or
manually importing the test from /nixos/tests/ in generic.nix is not
only ugly, but also forbidden should we ever move to pkgs/by-name.

We can achieve almost the same with a slightly different setup. We allow
overriding the postgresql package for the test via passthru.override, to
make sure that each postgresql_xx.tests.postgresql-wal-receiver is
properly teted with the right version.
2024-11-09 18:24:50 +01:00
Maximilian Bosch
3bf6a063b3
Merge: postgresqlPackages: fix some builds on darwin (#354748) 2024-11-09 18:21:30 +01:00
github-actions[bot]
a90280100f
Merge master into staging-next 2024-11-09 15:14:08 +00:00
Wolfgang Walther
4801d0c2a3
postgresql17Packages.{pg_cron,pg_hll}: fix build on x86_64-darwin
This fixes the following error:

error: comparison of integers of different signs: 'ssize_t' (aka 'long')
and 'const size_t' (aka 'const unsigned long') [-Werror,-Wsign-compare]
                if (part < iov[i].iov_len)
                    ~~~~ ^ ~~~~~~~~~~~~~~
2024-11-09 12:16:58 +01:00
Maximilian Bosch
676db52174
postgresql_17: fix build
Closes #354497

See https://www.postgresql.org/message-id/ba8e1bc0-8a99-45b7-8397-3f2e94415e03%40suse.de for context.
2024-11-08 20:36:48 +01:00
Wolfgang Walther
d1478e78c0
postgresqlPackages.system_stats: fix build on darwin
The build was failing with:

darwin/io_analysis.c:71:21: error: variable length array used
[-Werror,-Wvla]
                        char device_name[kMaxDiskNameSize];
                                         ^~~~~~~~~~~~~~~~
2024-11-08 19:48:39 +01:00
github-actions[bot]
e953c01873
Merge staging-next into staging 2024-11-05 00:14:28 +00:00
Maximilian Bosch
184cda2b94
postgresql: remove danbst from maintainer list
Thanks a lot for all your work! If you ever come back to nixpkgs, feel
free to revert the commit, your return would be welcomed!
2024-11-02 15:47:50 +01:00
Maximilian Bosch
c65705940a
postgresql: use team
Main motivation for this is that I'd like to get a feature-freeze ping:
we have old stuff to remove and quite a bit of things ongoing here, so
explicitly being part of the check-up process seems like a good thing.

Also added myself and wolfgangwalther to it.
2024-11-02 15:47:32 +01:00
github-actions[bot]
6d99484921
Merge staging-next into staging 2024-10-31 12:05:55 +00:00
Maximilian Bosch
976f14bc27
Merge: postgresql: plugin pg_embedding is no longer maintained (#351306) 2024-10-31 12:13:03 +01:00
Maximilian Bosch
a34f8f6c4b
Merge: postgresql.withPackages: support withJIT and withoutJIT (#352158) 2024-10-31 10:35:07 +01:00
Wolfgang Walther
6cc9178c31
postgresql.withPackages: support withJIT and withoutJIT
This allows using postgresql.withPackages in the nixos module, which
calls withJIT and without JIT.

Supersedes #351968
2024-10-29 19:38:44 +01:00
Wolfgang Walther
e24121ec20
postgresqlPackages: replace custom installPhase with buildPostgresqlExtension helper 2024-10-29 09:55:20 +01:00
Fabián Heredia Montiel
34b62f7c47 Merge remote-tracking branch 'origin/master' into staging-next 2024-10-27 16:10:56 -06:00
Claude Doppler
66285c63ce postgresqlPackages.pg_embedding: plugin is no longer maintained 2024-10-27 09:59:48 -03:00
Wolfgang Walther
29225a3106
postgresqlPackages.lantern: 0.3.3 -> 0.4.1
Changelog at:
https://github.com/lanterndata/lantern/releases
2024-10-27 09:02:44 +01:00
Wolfgang Walther
357b7aabfe
postgresqlJitPackages.lantern: fix build
The link_llvm_objects.sh script used a hardcoded /bin/bash shebang,
which failed during a JIT-enabled build.
2024-10-27 09:00:40 +01:00
Wolfgang Walther
203af243af
postgresql17Packages: mark remaining extensions as broken
Those extensions don't support building with PostgreSQL 17, yet.

To make sure they will show up as build failures after the next package
upgrade, they all have version checks for their own package version
included.
2024-10-27 08:35:47 +01:00
Wolfgang Walther
4cc4534295
postgresql_17: init at 17.0 2024-10-26 15:15:24 +02:00
Wolfgang Walther
9789c756bf
postgresql16Packages.smlar: mark as broken on darwin
Broken on linux (JIT) as well.
2024-10-26 15:15:24 +02:00
Wolfgang Walther
1b19f8df55
postgresql16Packages.pg_ed25519: mark as broken on darwin
Broken on linux (JIT) as well.
2024-10-26 15:15:24 +02:00
Wolfgang Walther
d055dc25db
postgresqlPackages.pg_topn: 2.6.0 -> 2.7.0
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/citusdata/postgresql-topn/blob/master/CHANGELOG.md#topn-v270-october-18-2024
2024-10-26 15:15:24 +02:00
Wolfgang Walther
97b965aedb
postgresqlPackages.plv8: 3.2.2 -> 3.2.3
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/plv8/plv8/blob/r3.2/Changes
2024-10-26 15:15:23 +02:00
Wolfgang Walther
8b831f9b15
postgresqlPackages.lantern: 0.2.4 -> 0.3.3
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/lanterndata/lantern/releases
2024-10-26 15:15:23 +02:00
Wolfgang Walther
9fc6c9536f
postgresqlPackages.pg_cron: 1.6.2 -> 1.6.4
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/citusdata/pg_cron/releases/tag/v1.6.3
https://github.com/citusdata/pg_cron/releases/tag/v1.6.4
2024-10-26 15:15:23 +02:00
Wolfgang Walther
f36c4e6bbf
postgresqlPackages.pg_ivm: 1.8 -> 1.9
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/sraoss/pg_ivm/releases/tag/v1.9
2024-10-26 15:15:23 +02:00
Wolfgang Walther
31d68c9d30
postgresql16Packages.pg_similarity: fix build on darwin
Also fixes the build on linux with clang (JIT).
2024-10-26 15:15:23 +02:00
Wolfgang Walther
6d1cbda724
postgresqlPackages.pg_similarity: 1.0 -> 1.0-unstable-2021-01-12
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/eulerto/pg_similarity/compare/pg_similarity_1_0...master
2024-10-26 15:15:23 +02:00
Wolfgang Walther
10d228bc7f
postgresqlPackages.pg_squeeze: 1.6.2 -> 1.7.0
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/cybertec-postgresql/pg_squeeze/releases

The changelog is only available for beta 2, but 1.7.0 was released
properly after that without changelog.
2024-10-26 15:15:23 +02:00
Wolfgang Walther
d37563232d
postgresqlPackages.pgroonga: 3.1.8 -> 3.2.3
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/pgroonga/pgroonga/releases
2024-10-26 15:15:22 +02:00
Wolfgang Walther
b6d191bbc2
postgresqlPackages.plr: 8.4.6 -> 8.4.7
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/postgres-plr/plr/blob/master/changelog.md#846---2023-08-01
2024-10-26 15:15:22 +02:00
Wolfgang Walther
c04efb0ce1
postgresqlPackages.tds_fdw: 2.0.3-unstable-2024-02-10 -> 2.0.4
Makes building with PostgreSQL 17 succeed.

Changelog:
https://github.com/tds-fdw/tds_fdw/releases/tag/v2.0.4
2024-10-25 19:54:13 +02:00
Fabián Heredia Montiel
fdc64cfee0 Merge remote-tracking branch 'origin/master' into staging-next 2024-10-22 09:14:28 -06:00
Nikolay Korotkiy
b3413ccd23
postgresqlPackages.pgrouting: 3.6.2 → 3.6.3 2024-10-21 22:13:37 +04:00
github-actions[bot]
31b11f1926
Merge staging-next into staging 2024-10-15 00:14:36 +00:00
Dee Anzorge
ed1c5625be postgresqlPackages.rum: 1.3.13 -> 1.3.14
Also add a simple smoke test.

Changes: https://github.com/postgrespro/rum/releases/tag/1.3.14
2024-10-14 01:12:01 +02:00
github-actions[bot]
96ea2a3c2f
Merge staging-next into staging 2024-10-09 00:14:47 +00:00
K900
956f9243c0 Merge remote-tracking branch 'origin/master' into staging-next 2024-10-08 21:15:13 +03:00
Sandro
f0668c1c85
pgmq: init at 1.4.4 (#346486) 2024-10-08 16:51:29 +02:00
Derek Kulinski
7985f2737e pgmq: init at 1.4.4 2024-10-07 16:45:39 -07:00
github-actions[bot]
483deb3a04
Merge staging-next into staging 2024-10-04 12:06:05 +00:00
github-actions[bot]
5942e21e4e
Merge master into staging-next 2024-10-04 12:05:36 +00:00
Augustin Trancart
3d19c66a1f postgresqlPackages.postgis: 3.4.3 -> 3.5.0 2024-10-03 18:01:30 +02:00
github-actions[bot]
c101f2dc94
Merge staging-next into staging 2024-09-27 18:04:55 +00:00
github-actions[bot]
911b856128
Merge master into staging-next 2024-09-27 18:04:26 +00:00
Sandro
512f8ce65e
postgresql15Packages.wal2json: 2.5 -> 2.6 (#315097) 2024-09-27 14:53:34 +02:00
Wolfgang Walther
6178e9bd3c
postgresql: remove deprecated enableSystemd override
This was deprecated in e6bfabf366, where
we agreed on removing this after one release in [1].

Time has come!

[1]: https://github.com/NixOS/nixpkgs/pull/292993#discussion_r1518883146
2024-09-26 19:08:55 +02:00
Wolfgang Walther
a7fdf2256a
postgresql: simplify systemdSupport default value
systemd is not available on static platforms, so the isStatic check is
redundant.
2024-09-26 19:08:54 +02:00
Wolfgang Walther
de4ad2a6ac
postgresql: use newer libuuid instead of ossp-uuid
Since PostgreSQL 9.4 it's possible to build with different uuid
libraries. Eversince, the postgres docs [1] have this to say:

  [..] the OSSP UUID library [..] is not well maintained, and is
  becoming increasingly difficult to port to newer platforms. [..]
  On Linux, OS X, and some other platforms, suitable functions are
  provided in the libuuid library, which originally came from the
  e2fsprogs project (though on modern Linux it is considered part of
  util-linux-ng).

Using e2fs for Darwin was introduced 9 years ago in #8574, which library
to use for Linux was never considered again. Thus, start building with
newer libs now.

As a side effect, we require one less patch if we decide to build with
meson later.

[1]: https://www.postgresql.org/docs/current/uuid-ossp.html
2024-09-26 19:08:54 +02:00
Wolfgang Walther
149aa98ce4
postgresql: run full test-suite during checkPhase
doCheck was enabled in #61395 which does not mention an explicit decision
for "check" instead of "check-world". The latter runs more tests, for example
for contrib modules etc. - but results in higher build times..

Running "nix-build -A postgresql":
- with doCheck = false: 46s
- with checkTarget = "check": 60s
- with checkTarget = "check-world": 75s
2024-09-26 09:40:04 +02:00
Wolfgang Walther
fad9dabf9f
pkgsMusl.postgresql: disable "locale -a" properly
/bin/locale doesn't exist on musl and was already effectively disabled
in #228349. However this still leaves the following warning for initdb:

  performing post-bootstrap initialization ... sh: locale: not found

By applying the alpine patch to disable locale -a entirely, this warning
will disappear. This will also make one more regression test pass when
testing "check-world" instead of "check", only.
2024-09-26 09:40:04 +02:00
github-actions[bot]
3b110ff21b
Merge staging-next into staging 2024-09-26 00:14:18 +00:00
K900
a9128ce2f2 Merge remote-tracking branch 'origin/master' into staging-next 2024-09-25 21:07:19 +03:00
Maximilian Bosch
fc16319c06
Merge: postgresqlPackages: refactor extension checks with helper (#343486) 2024-09-25 19:06:11 +02:00
Franz Pletz
f6e93ec992
postgresqlPackages: some cleanup (#343309) 2024-09-25 17:29:40 +02:00
Artturin
f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
github-actions[bot]
6ef8ec38ed
Merge staging-next into staging 2024-09-24 12:05:42 +00:00
github-actions[bot]
bcd5388d39
Merge master into staging-next 2024-09-24 12:05:12 +00:00
Yt
2232cae406
postgresqlPackages.pgvecto-rs: 0.2.1 -> 0.3.0 (#321617) 2024-09-24 05:56:28 -04:00
Euan Kemp
4450044b7b postgresql15Packages.wal2json: 2.5 -> 2.6 2024-09-24 10:32:36 +09:00
Wolfgang Walther
fa8a147338
postgresqlPackages: remove unused derivation arguments
Those had been replaced by the following a while ago:

  buildInputs = postgresql.buildInputs
2024-09-23 20:05:37 +02:00
Wolfgang Walther
f27f203f5a
postgresqlPackages: use makeFlags USE_PGXS=1 consistently 2024-09-23 20:05:36 +02:00
Wolfgang Walther
37ac1256c4
postgresqlPackages.pgjwt: add simple create extension check 2024-09-21 14:16:13 +02:00
Wolfgang Walther
2b9fa464cf
postgresqlPackages: refactor extension checks
The withPackages scope now provides a "postgresqlTestExtension" helper
which removes all the boilerplate for those kind of tests.

This was Mario Rodas' idea in #299756.
2024-09-21 14:16:12 +02:00
Wolfgang Walther
b6567e0a54
postgresqlPackages.lantern.tests.extension: fix test
The name of the access method was changed upstream a while ago.
2024-09-21 14:16:12 +02:00
github-actions[bot]
b84aacf2e6
Merge staging-next into staging 2024-09-21 12:05:41 +00:00
github-actions[bot]
d3ae261fc3
Merge master into staging-next 2024-09-21 12:05:16 +00:00
Maximilian Bosch
9163a9f3b8
Merge: postgresql: improve fake pg_config in default output (#341421) 2024-09-21 14:04:45 +02:00
Maximilian Bosch
789562caae
Merge: nixos/tests: add postgresql wal2json test (#315095) 2024-09-21 13:27:22 +02:00
Maximilian Bosch
2795949808
Merge: postgresql_jit.pkgs.postgis: fix build on darwin (#342369) 2024-09-21 11:53:12 +02:00
Augustin Trancart
dc750b8237 postgresqlPackages.postgis: 3.4.2 -> 3.4.3 2024-09-20 23:58:45 +02:00
Wolfgang Walther
486633e3f4
postgresqlPackages.system_stats: 3.0 -> 3.2 2024-09-20 19:08:36 +02:00
K900
d8a54461fc Merge remote-tracking branch 'origin/staging-next' into staging 2024-09-20 07:27:56 +03:00
Wolfgang Walther
0c47767641
postgresql: improve fake pg_config in default output
This fixes some build systems which look up the location of pg_config
via the location of the postgres binary itself, e.g. timescaledb,
instead of calling pg_config which is on PATH.

Since the -dev output is correctly placed before the default output of
postgresql in PATH, we can rely on that and call "pg_config" from the
default output's fake script. Only do that, when the one on PATH is
actually a different file, though, to prevent infinite loops.

Resolves #341408
2024-09-19 18:58:20 +02:00
Wolfgang Walther
cd85a62bc2
postgresql_jit.pkgs.postgis: fix build on darwin
We introduced LTO in #294504. At that time, we still needed to use LLVM
/ lld to make this work on darwin. For this to work for extensions, they
would need to set CFLAGS=-fuse-ld=lld, too. However, since #307880
landed, we don't need to do this anymore in the first place, LTO just
works out of the box on darwin.

Resolves #342362
2024-09-19 14:50:23 +02:00
Peder Bergebakken Sundt
8c8c27bb19 treewide: remove unused inputs 2024-09-18 01:00:07 +02:00
Wolfgang Walther
eb709dd183
timescaledb: use replace-fail instead of replace for substituteInPlace
To avoid the deprecation warning.
2024-09-16 21:43:36 +02:00
Wolfgang Walther
52bb840eaf
postgresql: fix regress tests after tzdata update
This was discussed upstream here:
https://postgr.es/m/0a997455-5aba-4cf2-a354-d26d8bcbfae6%40technowledgy.de

This will be in the next minor releases, until then apply the patch.
2024-09-15 17:10:21 +02:00
Euan Kemp
554ec1c0f0 nixos/tests: add postgresql wal2json test
This test should ensure wal2json functions.
I'm planning to upgrade wal2json, so it seems nice to have a test here.

It passes on my machine.
2024-09-14 05:17:49 +00:00
Maximilian Bosch
f191ad8240
postgresql: use systemdLibs (#337441) 2024-08-28 23:28:37 +02:00
github-actions[bot]
32f893fe9e
Merge staging-next into staging 2024-08-27 00:13:33 +00:00
Rebecca Turner
6602decb96
postgis: Do not hardcode test suite path (#336889)
postgis: Fix test suite

Fixes this failure:

```
Creating database 'postgis_reg-3.4'.
sh: line 1: /tmp/pgis_reg/regress_log: Permission denied
2024-08-23 19:26:18.810 UTC [3295760] FATAL:  database "postgis_reg-3.4" does not exist
psql: error: FATAL:  database "postgis_reg-3.4" does not exist
Loading unpackaged components from /tmp/nix-build-postgis-3.4.2.drv-0/postgis-3.4.2/regress/00-regress-install/nix/store/kg8g82wxhar9iadxrd3pra3af174khpb-postgis-3.4.2/share/postgresql/contrib/postgis
Loading PostGIS into 'postgis_reg-3.4'
sh: line 1: /tmp/pgis_reg/regress_log: Permission denied
 failed (Error encountered loading /tmp/nix-build-postgis-3.4.2.drv-0/postgis-3.4.2/regress/00-regress-install/nix/store/kg8g82wxhar9iadxrd3pra3af174khpb-postgis-3.4.2/share/postgresql/contrib/postgis/postgis.sql: /tmp/pgis_reg/regress_log)
make: *** [regress/runtest.mk:24: check-regress] Error 1
```
2024-08-26 11:39:19 -07:00
github-actions[bot]
ba8924e6a0
Merge staging-next into staging 2024-08-26 00:13:41 +00:00
Ivan Trubach
2f9c580c6f postgresql: use systemdLibs
Reduces the set of dependencies required to build PostgreSQL.
2024-08-26 01:48:49 +03:00
Wolfgang Walther
050689db30
treewide: fix pg_config / postgresql headers moved to dev output
This was supposed to happen in #294504, but the commit was accidentally
left out when splitting off some libpq-related changes. Originated in
#179962, by Sandro.

Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2024-08-24 15:44:10 +02:00
Bruno Bigras
c64122f97d postgresqlPackages.hypopg: 1.4.0 -> 1.4.1 2024-08-24 01:10:13 -04:00
Wolfgang Walther
73cb40366d
postgresql: refactor to simplify condition
glibc is not available on darwin anyway and isGnu is just shorter.
2024-08-23 21:37:49 +02:00
Wolfgang Walther
dfde86f738
postgresql: refactor removal of references in bitcode files
This prevents silently ignoring errors from "find".
2024-08-23 21:37:49 +02:00
Wolfgang Walther
94d432ce88
postgresql: remove references to llvm-dev on darwin as well
The !isDarwin condition seems to have been put in place only because of the
use of patchelf, which in turn seemed to be necessary because of nuke-refs.

Replacing the big nuke with the more granular remove-references-to allows
enabling this for darwin, too.
2024-08-23 21:37:49 +02:00
Wolfgang Walther
435f51c37f
postgresql: split dev output
This splits a dev output to make the default output not depend on any
build dependencies anymore. This also avoids removing references from
pgxs' Makefile this way, which should, at least theoretically, be good
to build extensions via pgxs, making sure they use the same tooling.

ecpg is the "embedded SQL C preprocessor", which is certainly a dev
tool.

Most important, for closure size anyway, is to move pg_config to the dev
output, since it retains paths to all the other outputs.

The only thing with references to the dev output remaining is then the
postgres binary itself. It contains all the output paths, because it
shows those in the pg_config system view. There is no other way than
to nuke those references to avoid circular dependencies between outputs
- and blowing up closure size again.
2024-08-23 21:37:49 +02:00