Commit Graph

17 Commits

Author SHA1 Message Date
Maximilian Bosch
0b3eef7441
postgresql_12: remove
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-11-15 09:17:06 +01: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
Wolfgang Walther
77977286d8
postgresql: move libecpq to lib output
This library is used by other packages, so should be in the lib output.

By removing unused sections, libecpg will not contain any references to other
outputs and thus does not increase the closure for the lib output anymore.
This will also help massively when splitting a dev output later.

As a side-effect, this also unbreaks pkgsMusl.postgresql_12_jit and
pkgsMusl.postgresql_13_jit. For, at least to me, unknown reasons, those build
fine now.
2024-08-23 21:37:49 +02:00
Wolfgang Walther
5547322a0c
postgresql: move dynamic modules to default output
Dynamic modules are technically libraries, but are not used by other packages.
Instead they are loaded by PostgreSQL itself, e.g. as extensions. Those just
increased the size of the lib output without benefit.

This removes the NIX_PGLIBDIR hack introduced in #17838 and instead makes sure
that pg_config always returns the correct PGLIBDIR. The test for postgis
introduced in the same PR is still passing with the change.
2024-08-23 21:37:43 +02:00
Wolfgang Walther
154215cfd8
postgresql: rename patches
Trying to understand what each patch does made me come up with some more
descriptive names:

- Renaming the two disable-xxx patches to a common names makes it immediately
  clear that one replaces the other depending on version number.
- findstring was really not descriptive at all.
- hardcode-pgxs-path will be extended with more paths for split outputs in
  a later commit. Renaming here already to allow git to better track renames.

Finally replacing HARDCODED_PGXS_PATH with $out/lib in the last patch, makes
it easier to understand what the end result will look like when reading the
patch.
2024-04-04 08:41:18 +02:00
Wolfgang Walther
605618c2e8
postgresql: clean up patches
More cosmetic than anything else. The description in findstring.patch was
duplicated, postgresql-9.6.1 references confusing. Timestamps are not
needed, that's what git blame is for.
2024-04-04 08:41:18 +02:00
Wolfgang Walther
01463448be
postgresql: refactor to move locale-binary-path.patch into patches/
Seems to have been put in the wrong place.
2024-03-15 18:50:19 +01:00
Mario Rodas
2526c59458 Revert "postgresql: Fix build with libxml2 2.12"
This reverts commit 2ed47724a6.
2024-02-08 04:20:00 +00:00
Jan Tojnar
2ed47724a6 postgresql: Fix build with libxml2 2.12
libxml 2.12.0 made the error argument of xmlStructuredErrorFunc const
resulting in -Wincompatible-function-pointer-types error with CLang 16 and GCC 14.
61034116d0
2023-12-26 23:52:27 +01:00
Steve Purcell
ae5b96f3ab postgresql_16: init at 16.0 2023-09-16 18:19:06 +02:00
Jan Tojnar
76bd24f8fc postgresql: remove code for no longer supported versions 2022-11-01 12:33:14 +01:00
Mario Rodas
3bfbaf72fa postgresql_10: 10.14 -> 10.15
Release notes: https://www.postgresql.org/docs/10/release-10-15.html
2020-11-19 20:09:49 +01:00
Robert Hensing
83163b43e4 postgresql: Fix timetz test failure
A recent addition to the test suite turned out to be sensitive to
DST. The main code is ok. Patch only required to make test succeed.

See https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4a071afbd056282746a5bc9362e87f579a56402d
2020-11-04 09:58:09 +01:00
Mario Rodas
27733e2bf6 postgresql_13: init at 13.0
https://www.postgresql.org/docs/13/release-13.html
2020-09-24 04:20:00 +00:00
Matthew Bauer
376bb5108a postgresql: install in $out/share/postgresql
Fixes #62235
2019-05-30 22:30:15 -04:00
aszlig
ef553788d0
postgresql: Move socket dir to /run/postgresql
The default, which is /tmp, has a few issues associated with it:

One being that it makes it easy for users on the system to spoof a
PostgreSQL server if it's not running, causing applications to connect
to their provided sockets instead of just failing to connect.

Another one is that it makes sandboxing of PostgreSQL and other services
unnecessarily difficult. This is already the case if only PrivateTmp is
used in a systemd service, so in order for such a service to be able to
connect to PostgreSQL, a bind mount needs to be done from /tmp to some
other path, so the service can access it. This pretty much defeats the
whole purpose of PrivateTmp.

We regularily run into issues with this in the past already (one example
would be https://github.com/NixOS/nixpkgs/pull/24317) and with the new
systemd-confinement mode upcoming in
https://github.com/NixOS/nixpkgs/pull/57519, it makes it even more
tedious to sandbox services.

I've tested this change against all the postgresql NixOS VM tests and
they still succeed and I also grepped through the source tree to replace
other occasions where we might have /tmp hardcoded. Luckily there were
very few occasions.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @ocharles, @thoughtpolice, @danbst
2019-03-15 04:52:35 +01:00
Austin Seipp
73f56ae191 nixpkgs: move postgresql patches into a common directory
This simply makes it easier to browse the PostgreSQL package directory. More to
come.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-01-19 17:33:32 -06:00