0

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

Ubuntu terminal list of databases

it gives a different result from when I do the same in my Sql Shell

Sql shell list of databases

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:

  1. for project location (\wsl.localhost\Ubuntu\home\darkpoet\git_test_repo\projects)
  2. for postgres Ubuntu (/home/linuxbrew/.linuxbrew/Cellar/postgresql@15/15.4.reinstall/bin/postgres)
  3. for Sql shell (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PostgreSQL 15)
  4. for pgAdmin (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PostgreSQL 15).

Also see my Spring App properties:

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.

3
  • Please don't post images or links to images for content that can be adequately presented as inline formatted text. Commented Dec 27, 2023 at 18:49
  • @JohnH. What do you mean? I followed the exact instructions to post images inline. I am new so I followed everything to a T. Commented Dec 30, 2023 at 17:20
  • You posted links to images (I've edited the post to present the images inline). Using links means the reader has to navigate to the linked item which interrupts the reading flow. A larger issue in this case is that the images are presenting textual information as graphics. Please see Why should I not upload images of code/data/errors?. Please update the post by replacing the images with inline text. Commented Dec 30, 2023 at 18:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.