Craig (the poster I jumped in to reply to) would know the specifics better than I ever did. My recollection is:
- restore from the latest snapshot (there was one whether you’d configured a custom backup schedule or not)
- replay the write ahead log over the top to catch the restore up to the point in time you asked for/when you ran the command. At least some part of this process leveraged WAL-E, which was a tool largely developed by Heroku employees and open sourced.
This was a decade or more ago though. The state of the art of postgres has moved on and I assume the team would tackle it differently if they were doing it today.