PITR recovery fails when there are no transactions (pgbackrest)

Prolem

You are trying to do PITR recovery for a specific time, but the restore fails with something similar to the following message

FATAL:  recovery ended before configured recovery target was reached

Solution

This seems to be caused by a feature/bug that causes this error when there are no transactions between the backups, as explained in more detail here