I downloaded PostgreSQL from their site - http://www.postgresql.org/download/windows
However, I can\'t create a database from pgAdmin and get a mess
Your server might not be running. This can have 2 issus IMO:
I had the problem that the permissions were not set on the postgres folders and so the service was not able to start. I have no idea why that happend but giving proper permissions on the root postges folder and subfolders did the trick. If I recall it correctly, postgres is also installed as a service so you should find it in the Service List
To start the server, you have a startcommand in your Startmenu. Somewhere at Start -> PostgreSQL -> Start Service/Server/... (haven't used it on Windows for a long time but it should be there).
Please Download from this
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
install above downloaded file
then
The solution was simply to delete %appdata%\pgAdmin (win key + r then type %appdata% got folder pgAdmin) which was created by an earlier version. On systems other than Windows, there probably is a pgAdmin directory in your user directory. Of course, all session settings etc. are gone after deleting this.
you to restart services PostgreSQL from task manager click ctrl+alt+delete then chose services the postgresql-[version] chose the option to run automatically then start and apply ->ok
The solution was simply to comment the lines "work_mem=256MB" and "maintenance_work_mem=$3GB" in the file postgresql.conf and try to start the postgresql service. (start -> run -> services.msc) and look for the postgresql-[version] service then right click and start.
(start -> run -> services.msc) and look for the postgresql-[version] service then right click and enable it
You only need to do
pg_ctl register
then execute servcies.msc
enable the "PostgresSQL" and set to auto
then, your postgresql will run like the "server".