Documentation Index
Fetch the complete documentation index at: https://oxy.tech/docs/llms.txt
Use this file to discover all available pages before exploring further.
This guide explains how to connect to PostgreSQL with Oxy. PostgreSQL is a powerful, open-source object-relational database system.
Configuration Options
Add your PostgreSQL configuration to config.yml. Here are all available parameters:
databases:
- name: my_postgres_db # Unique identifier for this connection
type: postgres
host: "localhost" # PostgreSQL server hostname or IP
port: 5432 # PostgreSQL server port (default: 5432)
user: "postgres" # Username for authentication
password: <password> # Direct password (not recommended)
password_var: "PG_PWD" # Environment variable containing password (recommended)
database: "postgres" # Database name to connect to
ssl_mode: "require" # SSL mode (disable, require, verify-ca, verify-full)
Example Configurations
Prepare password environment variable
Export the environment variable:export PG_PWD=<your password>
Or put it in .env file:echo PG_PWD=<your password> >> .env
Add PostgreSQL configuration
databases:
- name: local_pg
type: postgres
host: "localhost"
port: 5432
user: "postgres"
password_var: "PG_PWD"
database: "myapp"
ssl_mode: "disable"
Troubleshooting
- Test connection:
psql -h localhost -U postgres -d mydb
- Check server logs:
/var/log/postgresql/postgresql-*.log
- Common issues:
- Wrong credentials
- Incorrect
pg_hba.conf configuration
- Network/firewall restrictions
- SSL certificate problems
- Monitor performance: Use
pg_stat_* views