I have a telegram bot (on Fly), which uses a Fly Postgres DB as well. I connect to the postgres DB via sqlalchemy, and it has been working well for the past 1 year, until today when I got this error:
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “top2.nearest.of.[postgres app name]” to address: Name has no usable address
I have a separate app/db for testing purposes, and it is working fine. As a temporary workaround, I have detached my main postgres db, and attached the test postgres db to my main app, and it seems to work fine.