Skip to content

Installing PostgreSQL on Windows

This guide explains in detail how to install the PostgreSQL database on Windows operating system. PostgreSQL is the database system required for running PCode.

Before starting the installation, please ensure:

  • You are using Windows 10 or higher
  • You have administrator privileges to install software
  • Your hard drive has at least 500MB of available space
  1. Visit the EnterpriseDB PostgreSQL Download Page
  2. Select the PostgreSQL version you need (recommended to use the latest stable version)
  3. Select the operating system as “Windows”
  4. Download the installer suitable for your system:
    • x86-64 (Recommended): For 64-bit Windows systems
    • x86-32: For 32-bit Windows systems
  5. Run the downloaded .exe installer

After double-clicking the installer, you will see the PostgreSQL installation wizard interface.

Launch Setup Wizard

Click “Next” to continue the installation process.

Choose the PostgreSQL installation directory. The default installation path is C:\Program Files\PostgreSQL\16.

Choose Install Location

Click “Next” to continue.

Select the components to install. By default, the following components are selected:

  • PostgreSQL Server - Database server
  • pgAdmin 4 - Graphical management tool
  • Stack Builder - Package manager
  • Command Line Tools - Command line tools

Select Components

It is recommended to keep the default selections and click “Next” to continue.

Specify the database data storage directory. The default path is C:\Program Files\PostgreSQL\16\data.

Choose Data Directory

Click “Next” to continue.

Step 5: Set Password for Initial Database User

Section titled “Step 5: Set Password for Initial Database User”

Set the password for the PostgreSQL superuser (postgres). This is the database administrator password, please keep it safe.

Set Password

:::warning Security Recommendations

  • Use a strong password (at least 8 characters, containing uppercase, lowercase, numbers, and special characters)
  • Do not forget this password, as you will need it when connecting to the database
  • Do not use simple passwords in production environments :::

Click “Next” to continue.

Set the port that the PostgreSQL service will listen on. The default port is 5432.

Set Port

Click “Next” to continue.

Step 7: Set Database Locale and Character Set

Section titled “Step 7: Set Database Locale and Character Set”

Set the database locale and character set.

Set Character Set

Click “Next” to continue.

The installer will display a summary of all configuration information. Please carefully review:

  • Installation path
  • Data directory
  • Port number
  • Locale settings

Review Summary

After confirming the information is correct, click “Next” to start installation.

The installer is now ready to begin copying files and configuring the system.

Ready to Install

Click “Next” to start the installation process.

The installer will display an installation progress bar. This process may take a few minutes.

Installation Progress

Please wait patiently for the installation to complete.

After installation completes, you will see the success prompt interface.

Installation Complete

Uncheck “Launch Stack Builder at exit?” (unless you need additional extensions) and click “Finish” to exit the installation wizard.

After PostgreSQL installation is complete, return to the Installation Guide to continue configuration.