Child pages
  • PostgreSQL installation
Skip to end of metadata
Go to start of metadata

PostgreSQL installation

Surf to http://www.postgresql.org/ and download the installer for the latest release. For new Windows users we recommend the "One click installer". After launching this installer you have to follow these installation screens. Note that for Windows 7 and Windows Vista you can not just click "next" but have to pay attention to avoid a fatal installation issue.

We recommend to keep the standard installation path for Windows XP. However, for Windows 7 and Windows Vista you can not install in a sub directory of the "program files" folder, e.g. the default c:\Program Files\PostgreSQL. Due to rigid security policy on these windows versions, the postgres user has no access to the "program files" folder. Installation will fail, and the error message will not display until the end of the installation process. Here we install in c:\PostgreSQL to avid this issue. For more details see this note. If you are not administrator, you might have to give the postgres user access manually for this other folder after the completion of the installation procedure and then reinstall (without prior uninstalling) PostgreSQL.

Note we changed folder!
Note we changed folder!

Now you can proceed with installation without further caveats.

Unlike a local file system with data filed, PostgreSQL always requires
log-in credentials. Remember to store these credentials well in a safe place.
You are the DBA (DataBase Administrator) of your local PostgreSQL database.

If you use the local PostgreSQL only as sandbox for learning how to work with
PostgreSQL, or as a cache for temporary project data, storing log-in credentials
in a function may be a convenient approach. For Matlab users a suggestion is to
save the credentials in a special function to automatic reuse. Of course this
is not recommended if you will use the local PostgreSQL for storing sensitive information.

function [user,pass]=pg_credentials

user = 'postgres';
pass = 'MyP@$$word';





You can now proceed with installing PostGIS.

If you see the "PostgreSQL Database Cluster Initialisation Failed Solution" error below at then end of the installation, you forgot to pay attention and installed in c:\Program Files\PostgreSQL. This is known to lead to failure of installation. Solution: uninstall, and reinstall in another folder, e.g. c:\PostgreSQL outside "Program Files\".