mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
postgresql: Allow to specify recoveryConfig.
This is needed for streaming replication in PostgreSQL 9.0 and higher. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
d5f0183153
commit
ab08c8a1bb
@ -129,6 +129,14 @@ in
|
||||
default = "";
|
||||
description = "Additional text to be appended to <filename>postgresql.conf</filename>.";
|
||||
};
|
||||
|
||||
recoveryConfig = mkOption {
|
||||
default = null;
|
||||
type = types.nullOr types.string;
|
||||
description = ''
|
||||
Values to put into recovery.conf file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
@ -177,7 +185,11 @@ in
|
||||
touch "${cfg.dataDir}/.first_startup"
|
||||
fi
|
||||
|
||||
ln -sfn ${configFile} ${cfg.dataDir}/postgresql.conf
|
||||
ln -sfn "${configFile}" "${cfg.dataDir}/postgresql.conf"
|
||||
${optionalString (cfg.recoveryConfig != null) ''
|
||||
ln -sfn "${pkgs.writeText "recovery.conf" cfg.recoveryConfig}" \
|
||||
"${cfg.dataDir}/recovery.conf"
|
||||
''}
|
||||
''; # */
|
||||
|
||||
serviceConfig =
|
||||
|
Loading…
Reference in New Issue
Block a user