S
Supabase2w ago
Hero

pgAdmin 4

I was struggling to connect my Supabase to pgAdmin 4. Did a lot of research and discovered that my Windows system doesn't support IPv6 and that when only IPv4 is available, we should use the session pooler. I found the session pooler portion or section of the connect area on my Supabase dashboard, entered that information into pgAdmin for a new server and it connected fine but only to the default Postgres database, not my database. Note that I just copied and pasted all the values from the session pooler section of the dashboard. So it shouldn't be a typo issue on the user's end. Can anyone figure out what I did wrong?
No description
15 Replies
inder
inder2w ago
The last segment in the connection string is the db name to connect to
Hero
HeroOP2w ago
I don't see a place to enter the db name, other than Maintenance database. But when I set that to my db name, Save fails. I also don't see a way in pgAdmin to set the connection via connection string; just this dialog.
inder
inder2w ago
Is this pgadmin container or desktop app?
inder
inder2w ago
1. Disconnect from server
No description
inder
inder2w ago
2. Now click on properties, you should be able to edit the db name now
No description
Hero
HeroOP2w ago
It's pgadmin desktop. I disconnected, opened properties. The only db name I could find is maintenance database. Is that what I change? Or somewhere else? Anyway, I changed that and on save, got this: connection failed: connection to server at "52.8.172.168", port 5432 failed: SSL connection has been closed unexpectedly Multiple connection attempts failed. All failures were: - host: 'aws-0-us-west-1.pooler.supabase.com', port: '5432', hostaddr: '54.177.55.191': connection failed: connection to server at "54.177.55.191", port 5432 failed: SSL connection has been closed unexpectedly - host: 'aws-0-us-west-1.pooler.supabase.com', port: '5432', hostaddr: '52.8.172.168': connection failed: connection to server at "52.8.172.168", port 5432 failed: SSL connection has been closed unexpectedly When I change that back to "postgres", it connects but still doesn't show MY db. But it can't actually be a CONNECTION issue since it does connect when "postgres" is the database. Does session pooling on the free plan support access to the non-default databases?
inder
inder2w ago
In self hosted supabase, supavisor which is the pooler stores password of the db in its own schema. I am not sure but the same thing might be happening here. I'll confirm this when I get home. But you should know that all the other services are tied to the default postgres db. I was able to connect to another db without any issues.
inder
inder2w ago
No description
No description
No description
Hero
HeroOP2w ago
Well, that looks promising, but still frustrating that I can't seem to do that. Any suggestions on how to troubleshoot my Supabase setup? There must be something there that is keeping my database from showing up in pgAdmin.
Hero
HeroOP2w ago
Could this data privacy setting be why at the organization settings screen?
No description
Hero
HeroOP2w ago
I guess not. I set it to schema, Logs, & Database Data and pgAmdin still only shows postgrs. That makes me wonder if somehow I'm not actually connecting to my account -- even though I copied all the values from my Supabase database Connection screen. So strange.
inder
inder2w ago
This is related to AI stuff. Doesn't apply in your case. Try with psql from command line There you can easily use the db url
psql --dbname=<ConnectionString>
psql --dbname=<ConnectionString>
Hero
HeroOP2w ago
I appreciate you sticking with me on this. I'm truly baffled. When I click on the qsql item in pgadmin, it asks for the connection info again. But it doesn't accept it if I select the current server set up and it gives a connection error if I create a new one with the same session pooler info it gives the getaddrinfo failed error. It does the same if I delete the current server and try to create another connection to the server using PSQL. To summarize: * I can't do a direct connection b/c my computer/router doesn't expose ipv6. * Setting up a server with Session pooler info does connect but shows only the postgres db. * Trying to set up a connection via the psql in pgAdmin refuses with the same session pooler data. And that's true whether that server is already set up in pgAdmin or not. * and if I select existing connection (in qsql) it shows: connection failed: connection to server at "54.177.55.191", port 5432 failed: SSL connection has been closed unexpectedly Multiple connection attempts failed. All failures were: - host: 'aws-0-us-west-1.pooler.supabase.com', port: '5432', hostaddr: '52.8.172.168': connection failed: connection to server at "52.8.172.168", port 5432 failed: SSL connection has been closed unexpectedly - host: 'aws-0-us-west-1.pooler.supabase.com', port: '5432', hostaddr: '54.177.55.191': connection failed: connection to server at "54.177.55.191", port 5432 failed: SSL connection has been closed unexpectedly
inder
inder2w ago
No i meant try in psql in your terminal. Not inside pgadmin
Hero
HeroOP2w ago
Hmmm... it said psql isn't recognized. I'll have to do some research into how to get the command line working. I'm sure I had the checkbox on when I installed pgadmin. I'll post back once I've done that and tried your command line. Thanks again!

Did you find this page helpful?