patternsqlMinor
Problems executing pg_ctl during pg_upgrade from 9.0 to 9.1 on Windows
Viewed 0 times
fromexecutingpg_ctlduringpg_upgradewindowsproblems
Problem
I'm trying to upgrade my 9.0 PSQL to 9.1 on Windows Server 2003. I've installed 9.1, stopped both services, and generally followed all steps on this guide. When I actually run the command, however, I get this:
How can I determine what the error was, and (more importantly) how to fix it/work around it?
I have tried entering the command
Upgrading from version 9.0.1 to 9.1.8
Edit: After deleting the contents of the temp directory where the command was executed (since it left some
`Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories ok
Checking cluster versions ok
""c:/program files/po
E:\pgtemp>"c:/program files/postgresql/9.1/bin/pg_upgrade.exe" --old-datadir "e:/postgresdata" --new-datadir "e:\pgdata" --old-bindir "c:/program files/postgresql/9.0/bin" --new-bindir "c:/program files/postgresql/9.1/bin"
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 invalid indexes from concurrent index builds ok
Checking for contrib/isn with bigint-passing mismatch ok
Creating catalog dump ok
There were problems executing ""c:/program files/postgresql/9.0/bin/pg_ctl" -w -l "nul" -D "e:/postgresdata" stop >> "nul" 2>&1"
Failure, exiting
How can I determine what the error was, and (more importantly) how to fix it/work around it?
I have tried entering the command
"c:/program files/postgresql/9.0/bin/pg_ctl" -w -l "nul" -D "e:/postgresdata" stop >> "nul" 2>&1 verbatim into the command line and received no error.Upgrading from version 9.0.1 to 9.1.8
Edit: After deleting the contents of the temp directory where the command was executed (since it left some
*.sql files lying about), and then deleting the postgresql.pid file it left lying in the new directory, and running the command again along with --logfile upgrade.log on the command, here's the log output:`Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories ok
Checking cluster versions ok
""c:/program files/po
Solution
Wow, good question. PG 9.2 has vastly improved pg_upgrade logging, for the exact reason you are seeing here --- that failures just aren't reported well, particularly on Windows where we can't output two streams to the same file. Is there a reason you are going to 9.1 and not 9.2?
It is also odd that the stop failed, while the start worked. Usually the failure is with server start. Are you using any non-default ports or anything?
It is also odd that the stop failed, while the start worked. Usually the failure is with server start. Are you using any non-default ports or anything?
Context
StackExchange Database Administrators Q#35324, answer score: 2
Revisions (0)
No revisions yet.