This whole question is extremely confusing, and the fact that you would consider switching to windows makes me think this is just trolling.
sudo apt-get install postgres
is literally all you need to do. Then systemctl start postgresql.service
But you should probably be using docker anyway.
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
Like, you're editing sources list files? Where did you read that that's a thing you should be doing?