Hacker News new | ask | show | jobs
by giancarlostoro 2555 days ago
One thing I love about Elixir is I had read the Erlang book from Joe Armstrong ages back, and a lot of ideas and concepts still apply. I just didn't get into Phoenix cause PGSQL is a PITA on Windows, so I have to go back and try with MySQL instead.
4 comments

Use Vagrant! Then you don't have to install/run PostgreSQL natively at all, and can run it inside a Linux VM.

https://www.vagrantup.com/

You could run PG in either WSL or a Docker container.

I currently use Windows (where I spend 99% of my time in WSL) and everything runs great.

Maybe somebody else knows where to wave the dead chicken to make postgres under WSL work well, but my last two tries (Feb 2018, Nov 2018) suggested that trying to do so invites lots of yak-shaving, pain, and poor performance. And that's just using the package manager to install, if you want to build from source, it may not work at all.

Stories to the contrary and hints how to make it work are welcome.

Might be worth retesting, we did some changes to PG to handle the unsupported syscalls more gracefully (warn once, and then not anymore) in a recent set of minor releases.
What issues are you having getting Postgres setup in Windows?

I've used the Windows installer[1] and have had no issues.

[1]: https://www.postgresql.org/download/windows/

I was unable to figure out how to setup accounts, and I am not used to PostgreSQL, I couldnt figure out my root password, which I swear was just "developer" but that didn't seem to work. I'm used to other database engines, despite my love of the idea of using PGSQL.
That’s not a windows issue, it’s an unfamiliar software issue. Take a weekend to learn how Postgres handles accounts. It takes a little getting used to but it is very much worth it.
Ah ok. Maybe it's because my install was basic without additional accounts. I just have my phoenix apps setup to use the default postgres/postgres login.
For some reason I remember having this PGSQL issue a couple of times on Windows, so I may either go with MySQL or what others suggested with WSL / Vagrant. Also I always forget database passwords after a week if it's not saved somewhere.
Screw windows and move to Linux! Opens up a ton of possibilities including docker