nixos/postgresql: remove recoveryConfig option

Since v12, PostgreSQL doesn't support recovery.conf anymore and fails to
start up when this option is set:

  FATAL:  using recovery command file "recovery.conf" is not supported

This is documented at:

https://www.postgresql.org/docs/current/recovery-config.html
This commit is contained in:
Wolfgang Walther 2025-05-08 12:14:23 +02:00
parent 8b9086b2dd
commit 7d0363742c
No known key found for this signature in database
GPG key ID: B39893FA5F65CAE1

View file

@ -90,6 +90,12 @@ in
"extraConfig"
] "Use services.postgresql.settings instead.")
(mkRemovedOptionModule [
"services"
"postgresql"
"recoveryConfig"
] "PostgreSQL v12+ doesn't support recovery.conf.")
(mkRenamedOptionModule
[ "services" "postgresql" "logLinePrefix" ]
[ "services" "postgresql" "settings" "log_line_prefix" ]
@ -588,14 +594,6 @@ in
'';
};
recoveryConfig = mkOption {
type = types.nullOr types.lines;
default = null;
description = ''
Contents of the {file}`recovery.conf` file.
'';
};
superUser = mkOption {
type = types.str;
default = "postgres";
@ -741,10 +739,6 @@ in
fi
ln -sfn "${configFile}/postgresql.conf" "${cfg.dataDir}/postgresql.conf"
${optionalString (cfg.recoveryConfig != null) ''
ln -sfn "${pkgs.writeText "recovery.conf" cfg.recoveryConfig}" \
"${cfg.dataDir}/recovery.conf"
''}
'';
# Wait for PostgreSQL to be ready to accept connections.