Wednesday, November 6, 2019

PostgreSQL 12 on Windows 10

I used previous versions of PostgreSQL, but I installed them with default Windows installer from the website which came with a Windows Service easy to start / stop. This last version 12 I installed with Chocolatey and I couldn't find any Windows Service to start.

So, back to documentation and googling. First I create environment variable PGDATA pointing to a newly created data folder, like C:\pgdata (easier than specify that folder in parameters). Then from C:\Program Files\PostgreSQL\12\bin I ran:

.\initdb C:\pgdata
.\pg_ctl start
.\createuser --interactive
.\createdb test1

Newly created user 'postgres' has the superuser role.

Additionally, you can create other users with passwords to be used by the applications.

Then, I prefer to use Valentina Studio which integrates nicely with Postgres.

No comments:

Post a Comment