nixpkgs/nixos/doc/manual/release-notes
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
..
release-notes.md nixos-render-docs: add structural includes, use for manual 2023-02-12 13:02:42 +01:00
rl-1310.section.md
rl-1404.section.md
rl-1412.section.md
rl-1509.section.md doc,nixos/doc: unescape double quotes 2022-12-27 17:13:49 +01:00
rl-1603.section.md doc,nixos/doc: unescape double quotes 2022-12-27 17:13:49 +01:00
rl-1609.section.md doc,nixos/doc: unescape apostrophes 2022-12-27 17:13:47 +01:00
rl-1703.section.md doc,nixos/doc: unescape apostrophes 2022-12-27 17:13:47 +01:00
rl-1709.section.md doc,nixos/doc: unescape apostrophes 2022-12-27 17:13:47 +01:00
rl-1803.section.md doc,nixos/doc: unescape double quotes 2022-12-27 17:13:49 +01:00
rl-1809.section.md doc,nixos/doc: unescape apostrophes 2022-12-27 17:13:47 +01:00
rl-1903.section.md doc,nixos/doc: unescape double quotes 2022-12-27 17:13:49 +01:00
rl-1909.section.md doc,nixos/doc: unescape double quotes 2022-12-27 17:13:49 +01:00
rl-2003.section.md doc,nixos/doc: unescape apostrophes 2022-12-27 17:13:47 +01:00
rl-2009.section.md doc,nixos/doc: unescape double quotes 2022-12-27 17:13:49 +01:00
rl-2105.section.md doc,nixos/doc: unescape double quotes 2022-12-27 17:13:49 +01:00
rl-2111.section.md doc,nixos/doc: unescape apostrophes 2022-12-27 17:13:47 +01:00
rl-2205.section.md baget: remove due to upstream being unmaintained 2023-03-19 14:19:49 +01:00
rl-2211.section.md nixos: fix typos 2022-12-17 19:31:14 -05:00
rl-2305.section.md postgresql: pass through JIT-enabled variant of non-JIT postgres and vice versa 2023-03-29 08:39:46 +02:00