Magnus Hagander's PostgreSQL blog (Entries tagged as win64)http://blog.hagander.net/
enSerendipity 1.6.2 - http://www.s9y.org/64-bit Windows in PostgreSQLhttp://blog.hagander.net/archives/160-64-bit-Windows-in-PostgreSQL.html
PostgreSQLhttp://blog.hagander.net/archives/160-64-bit-Windows-in-PostgreSQL.html#commentshttp://blog.hagander.net/wfwcomment.php?cid=1604http://blog.hagander.net/rss.php?version=2.0&type=comments&cid=160nospam@example.com (Magnus Hagander)
<p>Let me first say that I still stand by my <a href="http://blog.hagander.net/archives/73-PostgreSQL-vs-64-bit-windows.html" onclick="window.open(this.href, '_blank'); return false;">previous comments</a> that PostgreSQL is in much less need of a native 64-bit version on Windows than other databases - and less than PostgreSQL on other platforms. (Both this and the previous post talk about server-side support, having support client-side in libpq and ODBC is obviously important)</p>
<p>That said, I am now happy to say that with the effort of several people, it looks like we now have basic 64-bit support for PostgreSQL on Windows. During the past couple of weeks I have cleaned up and extended the patch from Tsutomu Yamada, which in itself builds on the work of several others, and applied it to cvs. As of today, you can build and run PostgreSQL on 64-bit Windows from the official repository.</p>
<p>This is obviously just the beginning. Unfortunately, Windows in general seems to be lagging behind quite severely on the 64-bit front, and this appears to be particularly true of the open source libraries. I've so far been unable to find 64-bit builds of many of the libraries we rely on for full functionality (gettext, zlib, libxml, libxslt, libiconv, tcl, uuid). While in theory support for these things should show up as soon as they are available, that's obviously not tested. If you know where I can download complete 64-bit binaries (including .lib and .h files for development) of any of these projects, please let me know.</p>
<p>Also, this is not very well tested yet. It passes all the PostgreSQL regression tests. That's pretty much all the tests I've been running on it. This is obviously a point where a lot of people can help - so <strong>please do</strong>. I have made a set of pre-alpha binaries available <a onclick="_gaq.push(['_trackPageview', '/extlink/www.hagander.net/pgsql/postgresql-8.5-pre-alpha-win64.zip']);" href="http://www.hagander.net/pgsql/postgresql-8.5-pre-alpha-win64.zip" onclick="window.open(this.href, '_blank'); return false;">here</a>. This is a bare-bones build of cvs head earlier today - things like OpenSSL that do have 64-bit binaries available is also disabled. It comes with no installer - just unzip into a directory, and use the <i>initdb</i> and <i>pg_ctl</i> commands directly. So if you have a 64-bit environment, please download and test this against your application!</p>
Sun, 10 Jan 2010 16:21:00 +0000http://blog.hagander.net/archives/160-guid.html8.5postgresqlwin64windowsPostgreSQL vs 64-bit windowshttp://blog.hagander.net/archives/73-PostgreSQL-vs-64-bit-windows.html
PostgreSQLhttp://blog.hagander.net/archives/73-PostgreSQL-vs-64-bit-windows.html#commentshttp://blog.hagander.net/wfwcomment.php?cid=7311http://blog.hagander.net/rss.php?version=2.0&type=comments&cid=73nospam@example.com (Magnus Hagander)
<p>Several completely independent people have asked me this in email already, so I figured it's about time for a blog post on the topic of PostgreSQL on 64-bit versions of Windows.</p>
<p>First for the simple answer: No, there is no 64-bit version of PostgreSQL for Windows. PostgreSQL has supported 64-bit environments on Unix for many years (long before we had x64 to make it available for wintel machines), but there is no Win64 port. Yet. And given the way that PostgreSQL is developed, there is no firm date for when this will be available.</p>
<p>Until then, though, the 32-bit version of PostgreSQL runs <i>perfectly fine</i> on 64-bit Windows. And doing so may actually be a <i>better idea</i> in some cases than a native 64-bit version. But most importantly, the architecture of PostgreSQL makes the requirement for a native 64-bit version <i>much less</i> than for many other competing databases. Particularly:</p>
<ul>
<li>PostgreSQL relies on the operating system to do much of the caching of data. Since the main limitation of running a 32-bit process is the total amount of memory being addressable, a system that is based on the database engine doing all the caching cannot address all the memory on a system with say 16Gb memory. For PostgreSQL, we leave much of that caching to the operating system which <i>can</i> address it, as long as the OS is 64-bit.</li>
<li>PostgreSQL uses a multi-process architecture, not multi-thread. I'm not going to get into the discussion about which is better, just summarize by saying there are good and bad points to both of them. In this case it's a good thing. In a multi-threaded database server, all client connections share the memory space, and are again limited by the total addressable memory region. With PostgreSQL, you could easily have more than 1Gb <i>per backend</i> (if necessary) without running out of memory, which significantly pushes away the point when you need to go to 64-bit.</li>
</ul>
<p>So why would it ever be <i>better</i> to run a 32-bit version than a 64-bit version? Simply because a 64-bit version is more memory-hungry. Every pointer used in the system takes twice as much space. Every int takes twice as much space. And if you're not actually going be able to cash in on the benefits (by addressing loads of memory, for example), it's a very real cost.</p>
I'm well aware that this is a fairly simplistic view on the 32- vs 64-bit situation in general, but it should be enough to explain why 32-bit PostgreSQL on 64-bit Windows isn't such a bad idea after all. And of course, this only applies if you are using an x64 version of Windows - with Itanium it's a whole different story.
Tue, 19 Feb 2008 23:00:00 +0000http://blog.hagander.net/archives/73-guid.htmlpostgresqlwin64windows