fix(delivery): align postgres recovery runtime checks

This commit is contained in:
2026-10-20 06:42:10 +08:00
parent 0a27704fd4
commit ebe71db564
3 changed files with 29 additions and 1 deletions
+1 -1
View File
@@ -373,7 +373,7 @@ def recover_locked(recovery_id: str, data_sha: str, password_file: Path, passwor
"RestrictAddressFamilies": "AF_UNIX",
"RuntimeDirectory": recovery_identity.RUNTIME.name,
"RuntimeDirectoryMode": "0700",
"ReadWritePaths": str(dependency_initialize.DATA),
"ReadWritePaths": str(dependency_initialize.DATA.parent),
}.items():
command.append("--property=" + key + "=" + setting)
command += [
+8
View File
@@ -180,6 +180,14 @@ def check_settings(rows) -> dict:
good = unit is None and int(value, 8 if value.startswith("0") else 10) == 0o700
elif key == "temp_file_limit":
good = unit == "kB" and value == expected
elif key == "archive_command":
# PostgreSQL's show hook masks the empty command while archiving is off.
good = (
unit is None
and value == "(disabled)"
and actual["archive_mode"] == ("off", None)
and actual["archive_library"] == ("", None)
)
else:
good = unit is None and value == expected
if not good: