HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlModerate

How to do a minor upgrade of PostgreSQL on Windows, e.g. 9.3.0 to 9.3.1?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqlminorwindowshowupgrade

Problem

What is the recommended way to perform a minor upgrade from PostgreSQL e.g. 9.3.0 to 9.3.1 using the Enterprise DB built windows installer? Should I uninstall first or just install over the existing installation?

The current installation was performed with postgresql-9.3.0-1-windows-x64.exe. Now I want to upgrade using postgresql-9.3.1-1-windows-x64.exe.

Solution

On Windows, simply stopping the postgresql service, then running postgresql-9.3.1-1-windows-x64.exe on top of the existing 9.3.0 works. No uninstall necessary. Of course, a backup is recommended.

Clear, explicit documentation for the update procedure on Windows is absent. Note that the documentation link provided by @dezso has been moved in the current manual to:
https://www.postgresql.org/docs/current/static/upgrading.html

The PostgreSQL Release Notes typically document migration tips in Appendix E.
For example,

  • Appendix E. Release Notes https://www.postgresql.org/docs/current/static/release.html



  • Section E.1. Release 10.1, subsection E.1.1. Migration to Version 10.1


https://www.postgresql.org/docs/current/static/release-10-1.html#idm46428658121200

The best source of Windows installer information was the Enterprise DB forums. Here are some posting I found that addressed the question...

  • 2010 April - What's the right way to upgrade to a new version of PostgreSQL


https://web.archive.org/web/20121210220213/http://forums.enterprisedb.com/posts/list/2246.page

  • 2009 September - Upgrade procedure when using one-click installer?


https://web.archive.org/web/20130603094838/http://forums.enterprisedb.com:80/posts/list/1906.page#6791

The upgrade info moves around from release to release. For example,

  • Version 10 location:


Chapter 18. Server Setup and Operation, section 18.6. Upgrading a PostgreSQL Cluster
https://www.postgresql.org/docs/10/static/upgrading.html

  • Version 9.3 location:


Chapter 17 Server Setup and Operation, section 17.6 Upgrading a PostgreSQL Cluster
http://www.postgresql.org/docs/9.3/static/upgrading.html

  • Version 9.0 location:


Chapter 24 Backup and Restore, section 24.4 Migration Between Releases
http://www.postgresql.org/docs/9.0/static/migration.html

As of June 2017, EnterpriseDB replaced their community discussion forums affecting the links in this answer(https://web.archive.org/web/20171021012954/https://www.enterprisedb.com/news/enterprisedb-announces-new-postgres-rocks-online-user-forum). I was able to hunt down some of the original posts on the Wayback Machine. One dead link that I was unable to repair is: "2010 January - Upgrading to 8.4.2 from 8.4.1",
http://forums.enterprisedb.com/posts/list/2115.page#7888.

Context

StackExchange Database Administrators Q#52766, answer score: 10

Revisions (0)

No revisions yet.