For long term stability, I suppose I may take for granted that the LTS
Ubuntu version of PostgreSQL would be better then installing through the
PostgreSQL apt repository.
The documentation I found on post installation setup suggests that
configuration may not be so diffucult.
Nevertheless I have a question about PostgreSQL superuser properties.
All the information (see for instance at help.ubuntu.com
https://help.ubuntu.com/community/PostgreSQL and at digitalocean.com
https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-ruby-on-rails-application-on-ubuntu-14-04)
seems to converge on the necessity of creating a database superuser with
login name that match my Ubuntu user name with:
sudo -u postgres createuser --superuser $USER
This, as far as I have understood, would allow the user and client
programs
to connect to the database without requiring a password: would that be
working for all my Rails applications too?
If instead I chose to set a password with:
sudo -u postgres psql
should this password match my Ubuntu user password or be different?
In case I chose a different password, I wonder in the first place what
advantages there would be in choosing my Ubuntu login name as PostgreSQL
superuser.
What is the best choice for Rails: no password, the same Ubuntu user
password or a different password?
Since in database.yml is recorded exactly this kind of sensitive
information, I suppose there might be security concerns after pushing
the
application to some Git repository hosting web site and to Heroku. Would
you rather suggest to edit .pgpass to keep sensitive information out of
the
*.yml file?
Finally, with PostgreSQL both in development and production, is the pg
gem
required?
I would really appreciate any help you can provide.