anchor.diff:                ln -sfn "${pkgs.writeText "recovery.conf" cfg.recoveryConfig}" \
                   "${cfg.dataDir}/recovery.conf"
               ''}
  -            chmod ${dirMode} "${cfg.dataDir}"
  +            ${optionalString (cfg.groupAccess != null) ''
  +              chmod ${dirMode} "${cfg.dataDir}"
  +            ''}
   
               exec postgres
             '';
  
positive.code:   config = mkIf cfg.enable {
  
      assertions = [
        { assertion = cfg.groupAccess -> versionAtLeast cfg.package.version "11.0";
          message = ''
            'groupAccess' is not available for PostgreSQL < 11.
          '';
  
negative.code:       ${cfg.extraConfig}
      '';
  
      dirMode = if cfg.groupAccess == true then "0750" else "0700";
  
  in
  
  