- Home
- Course Detail
regularpython@gmail.com
You are now watching:
Database Installation / of PostgreSQL Database Installation
PostgreSQL Installation (Windows 10 / 11)
Step-by-Step
Follow these steps to download, install, and verify PostgreSQL and pgAdmin on your Windows machine.
1. Prerequisites
●
Operating System: Windows 10 / Windows 11 (64-bit preferred).
●
Administrator access to install new software.
●
Minimum 2 GB free disk space.
Tip: Close other heavy applications before installation for a smoother experience.
2. Download PostgreSQL Installer
1
Open your browser and go to the official PostgreSQL downloads page:
https://www.postgresql.org/download/windows/
2
Scroll to "Windows" section and click on the installer link provided by EDB (EnterpriseDB).
3
Choose the latest stable version (for example: PostgreSQL 16.x) and download the Windows x86-64 installer.
3. Run the Installer & Choose Components
1
Locate the downloaded .exe file (for example: postgresql-16.x-windows-x64.exe) and double-click to start the setup.
2
On the Setup Wizard, click Next on the welcome screen.
3
Choose the Installation Directory (default is usually C:\Program Files\PostgreSQL\<version>) and click Next.
4
In the "Select Components" screen, keep the following selected:
PostgreSQL Server, pgAdmin, Stack Builder (optional), Command Line Tools
4. Configure Superuser Password & Port
1
When prompted for database superuser password (user:
postgres):
● Enter a strong password.
● Confirm the password.
● Write it down safely – you will use this to connect later.
● Confirm the password.
● Write it down safely – you will use this to connect later.
2
On the Port screen, keep the default port 5432 unless it is already in use. Click Next.
3
Choose the default Locale (usually your system locale) and proceed.
5. Install & Verify PostgreSQL Service
1
Review the summary and click Next to start the installation.
2
Wait until all components are installed. This may take a few minutes.
3
After completion, you can uncheck "Launch Stack Builder" (optional) and click Finish.
To verify service:
Open Services in Windows and confirm that the service name "postgresql-x64-<version>" is in Running state.
Open Services in Windows and confirm that the service name "postgresql-x64-<version>" is in Running state.
6. Open pgAdmin & Make First Connection
1
Click on Start Menu → PostgreSQL → pgAdmin to open pgAdmin.
2
The first time, pgAdmin will ask you to set a master password for storing connection details securely.
3
In the left Browser panel, click on the "PostgreSQL <version>" server.
Enter the postgres user password you configured during installation.
4
Once connected, you should see Databases, Schemas, and other objects.
7. Verify Installation with a Test Query
Run a simple SQL command to confirm PostgreSQL is working correctly.
1
In pgAdmin, right-click on Databases → postgres and choose Query Tool.
2
Paste and execute the following query:
SELECT version();
3
If you see the PostgreSQL version details in the output, your installation is successful.
✅ Now PostgreSQL and pgAdmin are ready on your system. You can start creating databases, tables, and connecting from your applications.