20.06.2023

Install postgresql Windows Server 2019

PostgreSQL is an open-source database management software that combines the capabilities of object-oriented and relational approaches to data storage. It has high power and scalability, and supports many features such as transactions, stored procedures and triggers, full-text search, geospatial data, JSON, and other. It also provides high performance,reliability and multithreading technologies. It is not a difficult task to install it and by few steps below, you can successfully install it yourself.

Download distribution kit

The initial step would be to download the installation files. The appropriate version of the installation file for our operating system can be downloaded from the official site "http://www.postgresql.org/download/windows".

Begin the installation process

Following that finish download process we run it. After starting the installation, a welcome window will appear, and we need to click the "Next" button.
Screenshot №1. Starting installation

Choosing the installation location

n the following screen, we have to select a directory for the installation of PostgreSQL. The installation directory is usually set to "C:\Program Files\PostgreSQL\" by default, however, it is possible to specify a different directory.
Screenshot №2. Choosing installation folder

Choosing components

In the following screen, there is an option to choose the components to install. By default, all components are selected; however, we can customize this selection based on our requirements. For this particular installation, we will only choose the essential components:

Screenshot №3.Choosing components

Setting parameters

In the upcoming screen, you will be required to create a password for the default PostgreSQL account. This password will enable you to access the PostgreSQL database.
Aside from the password, during the installation process, you will be prompted to specify the port on which the application will run, as well as the locale. We will keep the default settings for both.
Screenshot №4. Setting DBA password
Screenshot №5. Selecting application port
Screenshot №6. Choosing locale

Initiating installation process

After we have entered all the necessary parameters, tap "Next" button. PostgreSQL's installation may take some time, depending on the server's technical specifications.
Screenshot №7. Starting Install

Finishing up the installation process

Once the installation is finished, a window will appear indicating that PostgreSQL has been successfully installed. Click on the "Finish" button to close the installer.
Screenshot №8. Finish installation

Checking functionality

To ensure that PostgreSQL has been installed and is functioning correctly, you can launch the graphical utility, PgAdmin 4, after installation. From the list, select the server and enter the administrator user's password that was created during installation. Assuming everything has been set up accurately, a list of objects on the local server will appear. You can now generate an SQL query to display the installed version. To do this, right-click on the "postgres" database and choose the "Query Tool" option. In the right part of the screen in the "Query" field, enter:

SELECT version();

And click "Run". As a result, you will get something similar to the screenshot below:
By doing so, you can verify that the database is correctly functioning and available for use in your projects and applications.
Screenshot №9. Start PgAdmin 4
Screenshot №10. Connecting default local database
Screenshot №11. Verify version

Conclusion
By following the instructions provided, you can easily install PostgreSQL and use it for your projects and applications. Don't forget to regularly update PostgreSQL and keep an eye on the security of your database.