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

Cannot shutdown old postmaster when upgrading to Postgres 9.2

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

Problem

I'm upgrading to Postgres 9.2.2 (from 9.1.4). When I try to upgrade the DBs using:

pg_upgrade -b /usr/local/Cellar/postgresql/9.1.4/bin -B /usr/local/Cellar/postgresql/9.2.2/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres


I get the following error message:

Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories                 ok

There seems to be a postmaster servicing the old cluster.
Please shutdown that postmaster and try again.
Failure, exiting


I've trying stopping the server, but cannot get the upgrade command to work. How to I shutdown the old postmaster?

Solution

In OS X Yosemite, after having installed PostgreSQL via Homebrew:

launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
rm ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Code Snippets

launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
rm ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Context

StackExchange Database Administrators Q#30949, answer score: 6

Revisions (0)

No revisions yet.