Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between colors of PostgreSQL?

I am trying to set up a local version of PostgreSQL for use with my Rails app on Heroku according to the instructions at https://devcenter.heroku.com/articles/heroku-postgresql#local-setup.

When I grep'd for different heroku configurations

(heroku config | grep HEROKU_POSTGRESQL)

I got the following return:

HEROKU_POSTGRESQL_AQUA_URL:   postgres://mzqgqmkhlsgufo:Hk-Nu5SF6amY9mgl2n6u-Yi6U-@ec2-54-243-228-246.compute-1.amazonaws.com:5432/d8jndm2sub3lbt
HEROKU_POSTGRESQL_VIOLET_URL: postgres://nviwubpznhhgkv:siEYPLdOknBWOj1K3HePMn21DS@ec2-54-243-188-54.compute-1.amazonaws.com:5482/ddr1fm1ou7ha9s

Do the different colors have any significance? Would I be better served using one over the other or are they just random colors? Sorry if this is a silly question, but I wasn't about to find a question addressing this.

like image 498
Slater Victoroff Avatar asked Jan 04 '13 22:01

Slater Victoroff


2 Answers

Without digging into it very much, I think the main difference for you would be the port they listen on. Aqua listens on the PostgreSQL default port of 5432; violet on 5482. They seem to have different IP addresses, too, which might or might not affect you. (I don't recall off the top of my head how apps connect to Heroku.)

If you're installing locally, and you've never installed PostgreSQL before, it will probably listen on the default port, 5432.

The color names don't mean anything to PostgreSQL. That just seems to be a naming convention Heroku uses in managing their services.

like image 147
Mike Sherrill 'Cat Recall' Avatar answered Oct 31 '22 15:10

Mike Sherrill 'Cat Recall'


Short Answer: They are random colors.

You only get these colors when you have more than one database added onto your application.

Quoting Heroku:

As part of the provisioning process,a DATABASE_URL config var is added to your app’s configuration. This contains the URL your app uses to access the database. If your app already has a Heroku Postgres database and you’ve just provisioned another one,this config var’s name instead has the format HEROKU_POSTGRESQL__URL (for example,HEROKU_POSTGRESQL_YELLOW_URL).

SOURCE: https://devcenter.heroku.com/articles/heroku-postgresql

like image 40
twitchdotcom slash KANJICODER Avatar answered Oct 31 '22 13:10

twitchdotcom slash KANJICODER