nixpkgs/pkgs
Maximilian Bosch 43dbeae02d
postgresql: pass through JIT-enabled variant of non-JIT postgres and vice versa
This is useful if your postgresql version is dependant on
`system.stateVersion` and not pinned down manually. Then it's not
necessary to find out which version exactly is in use and define
`package` manually, but just stay with what NixOS provides as default:

    $ nix-instantiate -A postgresql
    /nix/store/82fzmb77mz2b787dgj7mn4a8i4f6l6sn-postgresql-14.7.drv
    $ nix-instantiate -A postgresql_jit
    /nix/store/qsjkb72fcrrfpsszrwbsi9q9wgp39m50-postgresql-14.7.drv
    $ nix-instantiate -A postgresql.withJIT
    /nix/store/qsjkb72fcrrfpsszrwbsi9q9wgp39m50-postgresql-14.7.drv
    $ nix-instantiate -A postgresql.withJIT.withoutJIT
    /nix/store/82fzmb77mz2b787dgj7mn4a8i4f6l6sn-postgresql-14.7.drv

I.e. you can use postgresql with JIT (for complex queries only[1]) like
this:

    services.postgresql = {
      enable = true;
      enableJIT = true;
    };

Performing a new override instead of re-using the `_jit`-variants for
that has the nice property that overlays for the original package apply
to the JIT-enabled variant, i.e.

    with import ./. {
      overlays = [
        (self: super: {
          postgresql = super.postgresql.overrideAttrs (_: { fnord = "snens"; });
        })
      ];
    };
    postgresql.withJIT.fnord

still gives the string `snens` whereas `postgresql_jit` doesn't have the
attribute `fnord` in its derivation.

[1] https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-JIT-ABOVE-COST
2023-03-29 08:39:46 +02:00
..
applications terraform-providers.oci: 4.112.0 → 4.113.0 2023-03-23 16:39:24 +10:00
build-support buildDotnetModule: add support for using combinePackages as dotnet-sdk 2023-03-19 20:53:39 +01:00
common-updater
data Merge pull request #222647 from r-ryantm/auto-update/lxgw-neoxihei 2023-03-23 08:40:33 +02:00
desktops Merge pull request #222449 from bobby285271/upd/cinnamon 2023-03-23 16:53:50 +08:00
development Merge pull request #222513 from r-ryantm/auto-update/python310Packages.azure-keyvault-administration 2023-03-23 10:43:58 +01:00
games Merge pull request #211152 from ThibaultLemaire/stuntrally-2.7 2023-03-22 18:45:45 +02:00
misc stabber: fix darwin build 2023-03-21 14:50:28 +11:00
os-specific Merge pull request #222683 from Ma27/linux-kernel-updates 2023-03-23 11:04:42 +01:00
pkgs-lib
servers postgresql: pass through JIT-enabled variant of non-JIT postgres and vice versa 2023-03-29 08:39:46 +02:00
shells nushell: 0.77.0 -> 0.77.1 2023-03-22 22:34:04 +00:00
stdenv
test Merge pull request #119362 from xworld21/texlive-combine-fix-buildenv 2023-03-17 02:34:17 -04:00
tools Merge pull request #203236 from Flakebi/fail2ban 2023-03-23 10:36:14 +02:00
top-level postgresql: implement opt-in JIT support 2023-03-29 08:39:46 +02:00