Prometheus doesn't talk to Postgres directly, so presumably you are using some sort of third-party remote-write/remote-read adapter, and most likely you're having a problem with that adapter. Therefore, your starting point should be to look at logs of that adapter.
You haven't said anything about what adapter you're using, nor even what version of Prometheus you're using. But the best place to get help with the adapter will be wherever it came from.
There are many other long-term storage solutions available, which may work better for you if you don't necessarily require Postgres.