Merge pull request #69194 from danbst/pg11-nixos

nixos/postgresql: switch default 9.6 -> 11
This commit is contained in:
Peter Simons 2019-10-02 20:02:25 +02:00 committed by GitHub
commit 8cd5aa8a82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -23,6 +23,11 @@
Support is planned until the end of October 2020, handing over to 20.09.
</para>
</listitem>
<listitem>
<para>
Postgresql for NixOS service now defaults to v11.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -226,7 +226,8 @@ in
# Note: when changing the default, make it conditional on
# system.stateVersion to maintain compatibility with existing
# systems!
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6
mkDefault (if versionAtLeast config.system.stateVersion "20.03" then pkgs.postgresql_11
else if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6
else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql_9_5
else throw "postgresql_9_4 was removed, please upgrade your postgresql version.");