Calvin Cheng
Calvin Cheng

Reputation: 36506

MacPorts: switching between postgresql90-server and postgresql91-server

Switching the postgresql client from postgresql90 to postgresql91 is simple enough, using MacPort's port select command like this:-

calvin$ sudo port select --set postgresql postgresql91
Selecting 'postgresql91' for 'postgresql' succeeded. 'postgresql91' is now active.

But how do I also select the postgresql server from postgresql90-server to postgresql91-server?

Following the pattern, I assume:-

calvin$ sudo port select --set postgresql-server postgresql91-server
Selecting 'postgresql91-server' for 'postgresql-server' failed: The specified group 'postgresql-server' does not exist.

Upvotes: 2

Views: 925

Answers (2)

Calvin Cheng
Calvin Cheng

Reputation: 36506

After some messing around, I am running both instances of postgresql 9.1 and postgresql 9.2 on my machine concurrently.

http://www.calvinx.com/2012/12/01/running-postgresql-9-1-and-postgresql-9-2-servers-concurrently-on-mac-osx-lion-via-macports/

Upvotes: 2

vyegorov
vyegorov

Reputation: 22845

If you're performing a “major” PostgreSQL upgrade, like 9.0 –> 9.1, then it will not be enough with just changing the binaries. Take a look at the Upgrading section of the manual.

And I suppose that is the reason why there's no group for PostgreSQL server.

In fact, I prefer to compile PostgreSQL from sources myself, as this way I have all the freedom to choose locations and naming conventions. And I'm sure that I will not screw up my database by accidentally upgrading port or rpm to the latest version.

EDIT: Check this out:

port info postgresql_select

Upvotes: 1

Related Questions