Requirements¶
PGSync has a small set of runtime dependencies.
Overview¶
| Component | Minimum Version | Required |
|---|---|---|
| Python | 3.10+ | Yes |
Source Database (choose one)¶
| Option | Minimum Version |
|---|---|
| PostgreSQL | 9.6+ |
| MySQL | 5.7+ |
| MariaDB | 10.5+ |
Search Backend (choose one)¶
| Option | Minimum Version |
|---|---|
| Elasticsearch | 6.3.1+ |
| OpenSearch | 1.3.7+ |
Key-Value Store (choose one)¶
| Option | Minimum Version |
|---|---|
| Redis | 3.1.0+ |
| Valkey | 7.2.0+ |
Configuration¶
Database Driver¶
export PG_DRIVER=psycopg2
Verify installation
import psycopg2
print("psycopg2 OK")
export PG_DRIVER=pymysql
Verify installation
import pymysql
print("PyMySQL OK")
Search Backend¶
Ensure the cluster is reachable from where PGSync runs.
curl -s http://localhost:9200 | jq .
Ensure the cluster is reachable from where PGSync runs.
curl -s http://localhost:9200 | jq .
Verify Installation¶
Run these commands to verify your environment:
# Python
python3 --version
# Database client
psql --version # PostgreSQL
mysql --version # MySQL/MariaDB
# Key-value store
redis-cli --version # Redis
valkey-cli --version # Valkey
Virtual Environment
Always use a virtual environment to isolate PGSync dependencies:
python3 -m venv venv
source venv/bin/activate
pip install pgsync