We will take a closer look at how to install PostgreSQL 11 on Windows, you will learn where to download PostgreSQL 11 for Windows, how the installation process looks like and how to connect to the PostgreSQL server.
PostgreSQL is a free database management system (DBMS). PostgreSQL 11 is the new version of this DBMS.
STEP-BY-STEP DESCRIPTION OF POSTGRESQL 11 INSTALLATION ON WINDOWS
PostgreSQL is implemented for many operating systems: Windows, Linux, macOS. Now we will consider in detail all the steps you need to perform in order to install PostgreSQL on Windows operating system: starting from loading graphical installer, which, by the way, includes pgAdmin 4 — a graphical management tool PostgreSQL, with which you can write SQL queries, and ending with the Russification of pgAdmin 4.
STEP 1 — BOOTING THE GRAPHICAL POSTGRESQL 11 INSTALLER FOR WINDOWS
You can of course download PostgreSQL 11 for Windows from the official PostgreSQL website, here is the link — https://www.postgresql.org/download/windows/.
After going to the page we can immediately click on the link “Download the installer”, in this case we will be taken to the site of EnterpriseDB company, which prepares graphics distributions PostgreSQL for many platforms, including Windows.
Then we choose the platform and version of PostgreSQL, in our case — it is Windows and PostgreSQL 11. Click on the link “Windows x86–64” — this is the version for 64-bit versions of Windows.
As a result, you should download the file postgresql-11.0–1-windows-x64.exe with the size of approximately 187 megabytes.
STEP 2 — RUNNING THE POSTGRESQL INSTALLER 11
Run the downloaded file. At first the installer will check if all the necessary components are present, in particular Visual C++ Redistributable, if necessary, i.e. if they are absent, it will install them itself.
After that a welcome window will be opened, click “Next”.
STEP 3 — SPECIFY THE DIRECTORY TO INSTALL POSTGRESQL 11
Then we need to specify the path to the directory where we want to install PostgreSQL 11, but we can leave it as default. If necessary, specify the path and click “Next”.
STEP 4 — CHOOSE COMPONENTS FOR INSTALLATION
On this step we can mark the components that we need to install, as you can see, among the components there is pgAdmin 4, leave the checkboxes against the components that we need and click “Next”.
STEP 5 — SPECIFY A DIRECTORY FOR DATABASE FILES
Next, we need to specify the directory where the database files will be located by default. In this case it is better to specify a separate drive. Click “Next”.
STEP 6 — SET A PASSWORD FOR THE POSTGRES SYSTEM USER
Now we need to set a password for the postgres user, in other words, for the PostgreSQL Server administrator. We enter the password and confirm it. Click “Next”.
STEP 7 — SPECIFY THE PORT FOR YOUR POSTGRESQL INSTANCE
Next, if necessary, we can change the port where PostgreSQL Server will work, but we can leave it by default. Click “Next”.
STEP 8 — SPECIFY THE ENCODING IN THE DATABASE
Then, if there is a need to specify a specific data encoding in the database, we can select the desired Locale from the drop-down list. I leave it as default, click “Next”.
STEP 9 — CHECKING POSTGRESQL INSTALLATION PARAMETERS
Here we just check the parameters we entered earlier for PostgreSQL installation, if everything is correct, i.e. everything you entered is pressed “Next”.
STEP 10 — START THE INSTALLATION PROCESS
To start the PostgreSQL installation process in this window, click “Next”.
The installation has begun.
STEP 11 — FINISHING THE INSTALLATION
The PostgreSQL 11 installation process takes only 2–3 minutes. When you see the message “Completing the PostgreSQL Setup Wizard” the PostgreSQL installation, pgAdmin 4 and other components will be completed.
In the last window we will be offered to run Stack Builder to load and install additional components, if you do not need anything, then uncheck “Lanch Stack Builder at exit?” and press “Finish”.
RUN PGADMIN 4 AND CONNECT TO POSTGRESQL SERVER 11
pgAdmin 4 you have installed together with PostgreSQL, to start pgAdmin 4 press “Start Menu → PostgreSQL 11 -> pgAdmin 4”.
The new version of pgAdmin 4 has a web interface, so you will launch a browser that will open the pgAdmin 4 application.
To connect to your newly installed local PostgreSQL 11 server in your server browser, click on “PostgreSQL 11”.
This will launch the “Connect to Server” window, where you need to enter the password of the system user postgres, i.e. it is the password that you invented when installing PostgreSQL. Enter the password, tick “Save Password” to save the password, and each time you do not enter it, click “OK”.
As a result you will connect to a local PostgreSQL server.