Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Mac OS X (Lion) Server includes Postgres (9.0.5) that it uses for some system utilities (Wiki server, caldav, etc.). I'm about to start using this server for some Rails applications and am wondering how to get my "kit" set up correctly. I'd like the version of Postgres to be the same (9.1.3) from development into production...though I suppose this isn't absolutely mandatory.

Being as Apple probably won't update the system version of Postgres past 9.0.x until Mountain Lion this summer what's the best way to get 9.1.3 on the server? I've been warned against replacing the system version as it might screw up some of Apple's tools or, perhaps, just get overwritten when there's a Lion update.

Is it true that Postgres can happily run multiple versions of itself on the same server...under same OS instance? If so then I assume I could just install 9.1.3 into /usr/local/ and create new clusters there...leaving the system install alone? But I'm concerned about conflicts. Dunno. never tried this?!?

Maybe there's a another way to handle this?

share|improve this question
    
I'm not sure about running multiple instances, I don't initially see why not. You'll have to change the port and/or socket in the postgres.conf, though. –  swasheck Mar 1 '12 at 18:18
    
Debian has an implementation by Martin Pitt that can install any number of different versions alongside. I couldn't say for Apple, though. –  Erwin Brandstetter Mar 1 '12 at 22:52
add comment

1 Answer

up vote 0 down vote accepted

Is it true that Postgres can happily run multiple versions of itself on the same server...under same OS instance?

I've run 8.3, 8.4, 9.0, and 9.1 at the same time on a single Windows server. You just need each PostgreSQL server listening on a different port. Choosing the port is part of the installation process.

I'm far to cynical to believe that PostgreSQL will never overwrite an existing data directory, but in my experience (none of it on OS/X), each version installs its own data directory.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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