I am a newbie coder so it's probably something I've installed wrong but I have a bit of a strange issue. I am attempting to run a Java Spring Boot backend application. I am using the Linux WSL subsystem as my development environment. When I list the postgres database in my Ubuntu terminal
it gives a different result from when I do the same in my Sql Shell
when I go into pgAdmin 4 to create and delete a database manually, only the database list in the Sql Shell is affected, implying that pgAdmin is in sync with my Sql Shell but not my Ubuntu terminal.
My first thought was duplicate postgres installations in different places. Here are the paths:
- for project location (\wsl.localhost\Ubuntu\home\darkpoet\git_test_repo\projects)
- for postgres Ubuntu (/home/linuxbrew/.linuxbrew/Cellar/postgresql@15/15.4.reinstall/bin/postgres)
- for Sql shell (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PostgreSQL 15)
- for pgAdmin (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PostgreSQL 15).
Also see my Spring App properties:
I was told to use Homebrew to install postgres in my terminal, which I did, but no clue how the installations ended up this way. Is there a way to somehow merge both databse lists or at least have pgAdmin communicate with database list in by Ubuntu terminal?
In my Spring application properties, I fiddled with spring.jpa.hibernate.ddl-auto parameters, setting to create, creat-drop and update to see if the database was been created and dropped properly. I also checked the version of postgres was the same as pgAdmin. The only thing I'll try next is to uninstall and install postgres and or pgAdmin again but that could get messy given that I'm still ot sure how the installations ended up in two different postgres in the Linux WSL subsystem and Windows system in the first place.


