Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d7e3a072ecb1
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4169ce094cfa
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Nov 28, 2018

  1. postgresql: enable systemd service notification on 9.6+

    This results in a marginal closure size increase of ~137mb -> ~141mb.
    This only affects the 'out' output, not the 'lib' output, so
    libpq-dependent expressions should not bloat as a result of this.
    
    The type of the systemd service is changed to 'notify' on 9.6+, which
    will help identify when Postgres is starting/shutting down.
    
    Signed-off-by: Austin Seipp <aseipp@pobox.com>
    (cherry picked from commit 1e83cf3)
    Signed-off-by: Domen Kožar <domen@dev.si>
    thoughtpolice authored and domenkozar committed Nov 28, 2018
    1
    Copy the full SHA
    4169ce0 View commit details
Showing with 8 additions and 2 deletions.
  1. +2 −0 nixos/modules/services/databases/postgresql.nix
  2. +6 −2 pkgs/servers/sql/postgresql/default.nix
2 changes: 2 additions & 0 deletions nixos/modules/services/databases/postgresql.nix
Original file line number Diff line number Diff line change
@@ -247,6 +247,8 @@ in
# Give Postgres a decent amount of time to clean up after
# receiving systemd's SIGINT.
TimeoutSec = 120;

Type = if versionAtLeast postgresqlPackage.psqlSchema "9.6" then "notify" else "simple";
};

# Wait for PostgreSQL to be ready to accept connections.
8 changes: 6 additions & 2 deletions pkgs/servers/sql/postgresql/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper, tzdata }:
{ stdenv, lib, fetchurl, makeWrapper
, glibc, zlib, readline, libossp_uuid, openssl, libxml2, tzdata, systemd
}:

let

@@ -16,7 +18,8 @@ let

buildInputs =
[ zlib readline openssl libxml2 makeWrapper ]
++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ];
++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ]
++ lib.optionals (atLeast "9.6" && !stdenv.isDarwin) [ systemd ];

enableParallelBuilding = true;

@@ -33,6 +36,7 @@ let
"--sysconfdir=/etc"
"--libdir=$(lib)/lib"
"--with-system-tzdata=${tzdata}/share/zoneinfo"
(lib.optionalString (atLeast "9.6" && !stdenv.isDarwin) "--with-systemd")
(if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid")
];