PostgreSQL Installer

To download the latest version of the installer, look in the win32 subdirectory on your nearest PostgreSQL mirror.

Installer walkthrough

The PostgreSQL installer is based on Windows Installer, so it should be familiar to most Windows users. Following is a quick walkthrough of the installer steps.

  1. Language selection
    Select the language you want to use for the installer. This only sets the language used in the install wizard - the actual installed PostgreSQL can be installed with or without language support and has it's own language choice independent from the installer.
    You can also select if you want the installer to create a detailed logfile of the installation process. Note that this logfile will contain both the service user and database superuser password if created.

    Installer screenshot

  2. Introduction screen
    Introduction message. Just click Next to get started.

    Installer screenshot

  3. Welcome message and instructions
    As always, please read the complete instructions before you continue.

    Installer screenshot

  4. Feature selection
    Select what you want to install. The server part will only be available on NT based platforms. Note that the 'Data Directory' option may only be installed on an NTFS partition. If you wish to install the data directory on any other partition type, you will need to run initdb.exe manually after installation.
    You can change the directory of the entire installation by selecting the feature PostgreSQL and click Browse to pick the new directory. You can also change the directory of an individual feature (such as the server, or pgAdmin) by selecting that feature and clicking Browse.

    Important! Choose PostgreSQL ODBC Driver (located under Database Drivers) when installing client computers.

    Installer screenshot

  5. Service installation
    Choose whether you want PostgreSQL installed as a service, and if so specify which account should be used. This account will be created and granted the Logon On as a Service right if required.

    Installer screenshot

  6. Initdb
    Chose whether you want a database cluster to be initialized in the database. If so, choose character set and encoding for your database, and specify login details for the database superuser. You may also specify a non-default port number to run the server on, and opt to listen for connections on all IP addresses on the system rather than just localhost. Enable this option. Note that you will still have to enable access in the host based authentication configuration (pg_hba.conf) to allow remote users to connecto the server.
    This file is located in C:\Program Files\PostgreSQL\data\ folder. You should stop the service before editing the file.
    Modify line under # IPv4 local connections: as the following:
    host all all 127.0.0.1 255.255.255.0 trust
    This dialog is only available if you chose to install PostgreSQL as a service.

    Installer screenshot

  7. Procedural languages
    Chose the procedural languages you want activated in template1. All PL files are always installed, this step just activates them by default in all your databases.
    This dialog is only available if you chose to install PostgreSQL as a service, and chose to have a database cluster initialized.
    PL/perl requires ActiveState Perl 5.8 to be installed. PL/python requires Python 2.3 to be installed, and PL/tcl requires ActiveState Tcl 8.4 to be installed.

    Installer screenshot

  8. Contrib modules
    Select the contrib modules to activate in template1. All contrib files are always installed, this step just activates them by default in all your databases.
    This dialog is only available if you chose to install PostgreSQL as a service, and chose to have a database cluster initialized.
    Note: The DBsize and pgAdmin Support modules are installed by default because pgAdmin will use them to provide enhanced functionality. They may be removed if you do not want them to be installed in all databases; pgAdmin will simply not offer the enhanced functionality they allow.

    Installer screenshot

  9. PostGIS
    Do not enable PostGIS.
  10. Ready to install
    Just click Next to start the actual installation.

    Installer screenshot

  11. Installing
    A progress bar is shown during the installation.
    On some versions of Windows (notably Windows XP before Service Pack 2 and Windows 2003 before Service Pack 1 - see Microsoft Knowledge Base article Q818858) a Command Prompt window will appear during the "Initializing database cluster" step. Don't close this window - it will automatically close once the operation is complete.

    Installer screenshot
     
  12. Finished
    Installation is complete. You acn now go ahead and test your installation and subscribe to the pgsql-announce mailing list to keep up to date.
    If you need to add or remove a feature from PostgreSQL, use the Add/remove programs feature in the Control Panel.

    Installer screenshot