I’m running Postgres 9.1’s pg_ugrade to migrate from 9.0 to 9.1 on Windows x64. After editing the permissions to allow full trust, running the tool as the postgres user, and working around a bug whereby pg_upgrade leaves the "old" store locked and refusing to run again ("there seems to be a postmaster servicing old cluster"), it now fails without explaining what’s wrong:

Performing Consistency Checks
Checking current, bin, and data directories                 ok
Checking cluster versions                                   ok
Checking database user is a superuser                       ok
Checking for prepared transactions                          ok
Checking for reg* system oid user data types                ok
Checking for contrib/isn with bigint-passing mismatch       ok
Creating catalog dump                                       ok

There were problems executing ""C:\Progs\Postgres\9.0\bin/pg_ctl" -w -l "nul" -D "C:\Progs\Postgres\9.0-data"  stop >> "nul" 2>&1"

Failure, exiting

Is this tool production-ready or am I wasting my time? If this is what I should be doing, what are your suggestions for solving the current failure?

  • 1
    For future users finding this topic because of the "servicing old cluster" message: if you truly do not have a postmaster running, and you are certain that you shut down the postmaster cleanly, this message means that there is a postmaster.id file in your directory that you need to delete. – Phrogz Feb 23 '13 at 23:26

Basically pg_upgrade is production ready.

Unfortunately the early builds of 9.1 had some bugs related to pg_upgrade and Windows. These were fixed in 9.1.3 as far as I know.

  • Will check it out next time I do an upgrade. – Roman Starkov Apr 13 '12 at 18:00

This is a minor version and, as such, you shouldn't need to run pg_upgrade. My understanding is that pg_upgrade is only for major version upgrades (e.g. 8.4 -> 9.0)


I stand corrected.

  • Do your Windows Event logs give any more detail about what's going on?
  • Have you tried the alternate path described in the link you provided (17.6.1. Upgrading Data via pg_dump)?

Edit 2:

I've honestly never used pg_upgrade and have only ever gone about it using pg_dump. Are you using the -l switch and dumping the session to a log?

Also, based on the error, it looks like postgres is having a hard time starting. Have you tried manually starting the server?

  • 3
    Negative; Postgres considers 9.0 -> 9.1 to be a major version change (reference, second paragraph). – Roman Starkov Mar 14 '12 at 16:15
  • fascinating. I stand corrected. – swasheck Mar 14 '12 at 16:20
  • I did end up upgrading via pg_dump, but I hate doing that. So I’d like to find out how to do this via pg_upgrade next time. I was not using -l. Manually starting the server works fine (both the old and the new version). – Roman Starkov Mar 14 '12 at 20:47
  • Ok. Glad it worked out for you. -l will allow you to dump the session to a log. Perhaps then you could get a better explanation of what the problem was. – swasheck Mar 14 '12 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.