Database Setup
Requirements
Creating the Database
Using psql
# Create database
psql -c "CREATE DATABASE authority_db;"
# Create user (optional)
psql -c "CREATE USER authority WITH PASSWORD 'secure_password';"
psql -c "GRANT ALL PRIVILEGES ON DATABASE authority_db TO authority;"Using createdb
createdb authority_dbConnection String
SSL Mode
Running Migrations
Tables Created
Table
Description
Seeding Data
Backup and Restore
Backup
Restore
Connection Pooling
Using PgBouncer
Performance Tuning
PostgreSQL Configuration
Indexes
Troubleshooting
Connection refused
Authentication failed
Database does not exist
Permission denied
Next Steps
Last updated
Was this helpful?