icps

notes

Postgresql

install

apt-get install postgresql

change passwd

sudo -u postgres psql postgres
\password postgres

gem

gem install pg

database.yml

1
2
3
4
5
6
7
8
9
10
11
default: &default
  adapter: postgresql
  encoding: unicode
  username: postgres
  password: password
  host: localhost
  pool: 5

development:
  <<: *default
  database: database_development

heroku

su postgres PGUSER=postgres PGPASSWORD=password heroku pg:pull HEROKU_DATABASE_NAME LOCALDB --app sushi

rails

rails new myapp --database=postgresql

wsl

ref https://github.com/Microsoft/WSL/issues/3863
data_sync_retry = on
ref https://github.com/Microsoft/WSL/issues/1761
export RUNLEVEL=1