asdf-postgres: heroku pg:psql does not work with asdf

Describe the bug

$ psql --version
psql (PostgreSQL) 13.1

$ type psql
psql is /Users/sobrinho/.asdf/shims/psql

$ heroku pg:psql --remote production
--> Connecting to [redacted]
psql: error: FATAL:  no pg_hba.conf entry for host "[redacted]", user "[redacted]", database "[redacted]", SSL off
 ▸    psql exited with code 2

I didn’t investigate though if this is an issue with Heroku CLI but I do have another machine using Homebrew Postgres and it works just fine, exactly the same version of the Heroku CLI/Node.JS.

Steps to reproduce

asdf install postgres 12.5 # or 13.1
heroku pg:psql --app [some app with postgres on Heroku]

Expected behavior

A psql session

Screenshots

N/A

Additional context

The machine failing is M1 and the one working is Intel, not sure if anything changes because of that.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

This one keeps coming up. It seems like my initial response to this was wrong. I will spend some time on it this weekend to see if I can get SSL support by default for 64-bit intel/arm mac, and intel ubuntu, and then let people open PRs for other platforms. @sobrinho, if you can do what @momolog suggested, it should unblock you for now. I’m sorry this has been such a pain.

No worries, thanks for spending your time on the project! ❤️

Alright, I just put another attempt to get it working up. It have it set up to use openssl, readline, zlib, curl, and uuid. I compiled 14.1 and 9.6.8 on an m1 mac running 11.6 and on ubuntu 20.04 in a docker container and both worked. I don’t have the time or the hardware to try it on much more. I am going to close this ticket. If any of you have issues, let me know what you ran into and I will see if I can get it fixed.