My locale settings were not properly configured when PostgreSQL was installed. Purging and reinstalling didn't help. I followed the instructions here and that did the trick for me.
Essential parts of the linked information reproduced below:
The problem showed itself in the following manner:
warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
...
are supported and installed on your system.
The first one was very easy to solve by executing:
#dpkg-reconfigure locales
...and choosing the preferred locales.
But after that PostgreSQL still refused to start. This is due to the fact that the installation process tried to create a cluster at installation time but because of the bad locales this wasn't done. So we have to redo this step by executing:
#pg_createcluster 9.3 main --start
(For the 9.3 version of PostgreSQL)
After that step PostgreSQL starts flawlessly via
#/etc/init.d/postgresql start
This answer applies to modifying the PostgreSQL source code by applying a "diff" or "patch". It's not about installing minor version updates; to do that, just download and run the installer.
To alter the PostgreSQL server its self or its procedural language runtimes, you will generally need to recompile PostgreSQL from scratch.
On Windows that's a bit of a rough job. The postgresql documentation covers the process, but it doesn't really deal with the dependencies etc.
I've written some tools and documentation to make it easier, but they don't yet compile all the dependencies like OpenSSL, so the resulting binaries aren't as feature-complete as the stock installer. They're also not guaranteed to be binary-compatible with extensions.
If you just need to patch an extension that's a little bit easier, though far from trivial. I spent some time a while ago figuring out how to build PostgreSQL extensions on Windows without recompiling all of PostgreSQL. A similar approach might work for recompiling things like pg_dump
and pg_restore
but I have not tested this.
Add-ons, clients and utilities like PostGIS, PgRouting, PgAdmin-III, psqlODBC, pgJDBC, psycopg2, the Ruby Pg gem, DBD::Pg, PgPool, etc etc etc are all compiled separately using different procedures. You'll want to look up the tool in question for details.
Frankly, if you're doing any kind of development work on PostgreSQL, I don't recommend Windows as a platform.
Best Answer
OK,
I posted a link to my compiled Slony 2.2.4 for Windows 64-bit under postgres 9.3.6. However, it was deleted I'm assuming because people may not trust my compile. Hence, here's the link to the Slony-I site with the instructions that I followed to compile Slony.
It's section 3.1.6. Building on Win32
http://www.slony.info/documentation/2.2/administration.html#BUILDINGWIN32