BLIP NOTE ON HOW TO INSTALL POSTGRESQL 14 IN WINDOWS 7 ENVIRONMENT WITHOUT PAIN

PostgreSQL Windows 7 support is a piece of dog sh#t.
That is why you almost always have a loads of quirks on the table here and there.
Beware that i’ve described Postgre installer in a soft words, it deserves way more.
Original installer skips almost all things which should be done by a proper one:
- it won’t initialize your database
- it won’t kickstart windows service
- it won’t setup system environment with correct variables
- it f#cks up user roles
- it throws loads of errors in your face like
Problem running post-install step.
Installation may not complete correctly.
The database cluster initialization failed.
Or something like this:
Connection to server localhost failed, connection refused 0x0000274D/10061
This blip note will help you to overcome stupid defects of software development during deployment process.
Ok, welcome to the club of pain. Fortunately for you i’ll explain the most common pitfalls than were set by developers
of this software around the place. I hope I’m not too late and you haven’t set your computer on fire.
Some people or even GPT bots are saying that v13 is the last version to support Windows 7, some mentioning v14.
I was able to make v15 work as if it is supported.
But unfortunately later on upon creating a new server in pgAdmin i ran into following nasty message:
'ServerManager' object has no attribute 'user_info'
So i reversed to older v14 version, which works just fine.
Although, i suspect that with the help of pgAdmin v6 you should overcome this stupid messy even in PosgreSQL v15 environment.
I’ll leave you with this task for your amusement.
Database is working however pgAdmin [should not be higher than v5.7]
,
at least taking into account official information from PostgreSQLsite.
Luckily with the help of [VxKex kernel extension]
you can [install and use even v6]
.
So in the end you have to install external version along side with native more modern one which is embedded into PostgreSQL v14 installer.
During installation you’ll be asked for a password for a superuser named “postgres”.
To skip all Windows 7 related tortures after PostgreSQL installation open console with administrative privileges and do the following.
Jump to binary folder of PostgreSQL. I am too lazy to fix absence of system environment variables:
cd "C:\Program Files\PostgreSQL\14\bin"
Manually force database initialization:
initdb -D "C:\Program Files\PostgreSQL\14\data"
Manually register service in services snap-in:
pg_ctl register -N "PostgreSQL 14" -D "C:\Program Files\PostgreSQL\14\data"
Start registered service:
net start "PostgreSQL 14"
Set it to auto-start if you’d like to:
sc config "PostgreSQL 14" start= auto
Next error you most likely run into in pgAdmin when adding new server:
FATAL: role "postgres" does not exist
Create required role by yourself.
Make sure that you are in C:\Program Files\PostgreSQL\14\bin folder:
createuser -s postgres
Ugh, actually it was waaaay more torturous installation process than Linux demonstrated.
I hope these fixes will help significantly, I’ll return to the topic if I dig up more abnormal things that need fixing.