Open In App

Install PostgreSQL on Windows

Last Updated : 09 Aug, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

Installing PostgreSQL on your Windows 10 machine is straightforward with the PostgreSQL installer. In this article, we’ll walk you through installing PostgreSQL version 11.3, ensuring a smooth setup process.

Steps to Install PostgreSQL on Windows

There are three crucial steps for the installation of PostgreSQL as follows: 

  1. Download PostgreSQL installer for Windows  
  2. Install PostgreSQL  
  3. Verify the installation 

Step 1: Downloading PostgreSQL Installer for Windows

You can download the latest stable PostgreSQL Installer specific to your Windows by clicking here.

Step 2: Installing the PostgreSQL installer

After downloading the installer double click on it and follow the below steps: 

  • Click the Next button.

Install PostgreSQL on Windows

  • Choose the installation folder, where you want PostgreSQL to be installed, and click on Next

Install PostgreSQL on Windows

  • Select the components as per your requirement to install and click the Next button. 

Install PostgreSQL on Windows

  • Select the database directory where you want to store the data and click on Next

Install PostgreSQL on Windows

  • Set the password for the database superuser (Postgres).

Install PostgreSQL on Windows

  • Set the port for PostgreSQL. Make sure that no other applications are using this port. If unsure leave it to its default (5432) and click on Next

Install PostgreSQL on Windows

  • Choose the default locale used by the database and click the Next button. 

Install PostgreSQL on Windows

  • Click the Next button to start the installation. 

Install PostgreSQL on Windows

  • Wait for the installation to complete, it might take a few minutes. 

Install PostgreSQL on Windows

  • Click the Finish button to complete the PostgreSQL installation. 

Install PostgreSQL on Windows

Step 3: Verifying the Installation of PostgreSQL

There are couple of ways to verify the installation of PostgreSQL like connecting to the database server using some client applications like pgAdmin or psql
The quickest way though is to use the psql shell. For that follow the below steps: 

  • Access psql Shell:
    • Search for “psql” in the Windows search bar and open it.
    • Enter server details (localhost), database (default “postgres”), port (default 5432), username (postgres), and the password you set during installation.
  • Check Installation:
    • In the psql shell, enter ‘SELECT version();’ to confirm PostgreSQL is installed correctly. You should see version information displayed.

Verifying the Installation of PostgreSQL

Tips:

  • Ensure firewall settings allow PostgreSQL connections. 
  • Explore pgAdmin or other client tools for database management.

Next Article

Similar Reads

three90RightbarBannerImg