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?

15 Replies
The last segment in the connection string is the db name to connect to
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.
Is this pgadmin container or desktop app?
1. Disconnect from server

2. Now click on properties, you should be able to edit the db name now

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?
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.



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.
Could this data privacy setting be why at the organization settings screen?

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.
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
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
No i meant try in psql in your terminal. Not inside pgadmin
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!