Diagnostic step 1
Change archive_command to write WAL files to a local staging directory first (simple mv or cp), return success to Postgres, and have a separate asynchronous process (systemd timer, cron, or dedicated uploader) reliably transfer staged files to the backup host with logging, retries, and timeouts.