nixpkgs/pkgs/servers/sql
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
..
cockroachdb treewide: env.NIX_CFLAGS_COMPILE use toString on result of optionals 2023-02-22 21:23:05 +02:00
dolt
mariadb Merge master into staging-next 2023-02-21 18:01:08 +00:00
materialize
monetdb monetdb: 11.45.11 -> 11.45.13 2023-02-03 08:15:49 +01:00
mssql/jdbc mssql_jdbc: 11.2.2 -> 12.2.0 2023-02-04 16:10:04 +00:00
mysql mysql80: 8.0.31 -> 8.0.32 2023-01-25 19:40:49 +01:00
patroni treewide: switch to nativeCheckInputs 2023-01-21 12:00:00 +00:00
pgbouncer pgbouncer: 1.17.0 -> 1.18.0 2023-01-01 13:42:46 +01:00
pgpool pgpool: 4.4.1 -> 4.4.2 2023-02-02 21:51:18 +00:00
postgresql postgresql: pass through JIT-enabled variant of non-JIT postgres and vice versa 2023-03-29 08:39:46 +02:00
proxysql proxysql: 2.5.0 -> 2.5.1 2023-03-15 17:39:35 +01:00
rqlite rqlite: init at 7.6.1 (#187962) 2023-02-17 13:52:34 +01:00
sqlite/jdbc