Configure a replication slot name on your standby and the upstream keeps WAL forever—until the slot itself fills your disk or the standby dies holding an old… (I consult on PostgreSQL through PGX Inc..)