Is it necessary to carry out a Point-in-Time Recovery for both an original Azure database server and its read-only complement?
No, it is not necessary to carry out a Point-in-Time Recovery (PITR) for both the original Azure database server and its read-only complement. The read-only replica is a replication of the primary database server, typically used for load balancing read workloads. PITR is only supported on the primary server, as it relies on transaction log backups and full backups maintained for that server. Read-only replicas cannot be restored independently using PITR. You must restore the original server and then recreate any read replicas from the newly restored server.
If you're planning PITR due to data loss, corruption, or rollback needs, perform it on the original server. The read-only replicas are derived from it and will be invalid after PITR unless recreated.
In the event of a catastrophe, you only need to perform a PITR on Server A (the Azure Database for PostgreSQL Flexible Server). Server B (the read-only replica) does not support independent PITR and does not maintain its own backups. After restoring Server A, you can recreate Server B as a read replica from the restored server if needed. Restoring both is unnecessary and would incur extra cost.
For more information on PITR in Azure Database for PostgreSQL Flexible Server, refer to this article.