While it’s good practice to use a Unix based operating system (ex. Linux or BSD) as a production server you can easily install PostgreSQL on Windows (hopefully only as a development server).

Download the Windows installation binaries from EnterpriseDB: http://www.enterprisedb.com/products-services-training/pgdownload This is a third-party company started by core contributors to the PostgreSQL project who have optimized the binaries for Windows.

Select the latest stable (non-Beta) version (9.5.3 at the time of writing). You will most likely want the Win x86-64 package, but if you are running a 32 bit version of Windows, which is common on older computers, select Win x86-32 instead.

Note: Switching between Beta and Stable versions will involve complex tasks like dump and restore. Upgrading within beta or stable version only needs a service restart.

You can check if your version of Windows is 32 or 64 bit by going to Control Panel -> System and Security -> System -> System type, which will say “##-bit Operating System”. This is the path for Windows 7, it may be slightly different on other versions of Windows.

In the installer select the packages you would like to use. For example:

All those optional packages can be later installed through “Application Stack Builder”.

Note: There are also other non-officially supported language such as PL/V8, PL/Lua PL/Java available.

Open pgAdmin and connect to your server by double clicking on its name, ex. “PostgreSQL 9.5 (localhost:5432).

From this point you can follow guides such as the excellent book PostgreSQL: Up and Running, 2nd Edition ( http://shop.oreilly.com/product/0636920032144.do ).

Optional: Manual Service Startup Type

PostgreSQL runs as a service in the background which is slightly different than most programs. This is common for databases and web servers. Its default Startup Type is Automatic which means it will always run without any input from you.

Why would you want to manually control the PostgreSQL service? If you’re using your PC as a development server some of the time and but also use it to play video games for example, PostegreSQL could slow down your system a bit while its running.

Why wouldn’t you want manual control? Starting and stopping the service can be a hassle if you do it often.

If you don’t notice any difference in speed and prefer avoiding the hassle then leave its Startup Type as Automatic and ignore the rest of this guide. Otherwise…

Go to Control Panel -> System and Security -> Administrative Tools.