From 218424f4607ae6562b3ebc021d898ed70628ecf3 Mon Sep 17 00:00:00 2001 From: aitbc Date: Wed, 20 May 2026 10:11:10 +0200 Subject: [PATCH] fix: use psycopg2 instead of psycopg for PostgreSQL connection - Fix connection string to use postgresql+psycopg2:// - Add libpq-dev for PostgreSQL development headers - Update deployment script with correct PostgreSQL driver --- scripts/deployment/deploy-integrated-blockchain-node.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/deployment/deploy-integrated-blockchain-node.sh b/scripts/deployment/deploy-integrated-blockchain-node.sh index 41b75f37..1807e1c9 100755 --- a/scripts/deployment/deploy-integrated-blockchain-node.sh +++ b/scripts/deployment/deploy-integrated-blockchain-node.sh @@ -136,12 +136,12 @@ setup_directories() { setup_postgresql() { log_info "Setting up PostgreSQL for mempool..." - # Install PostgreSQL + # Install PostgreSQL and development headers if command -v apt-get &> /dev/null; then apt-get update - apt-get install -y postgresql postgresql-contrib python3-psycopg2 + apt-get install -y postgresql postgresql-contrib libpq-dev elif command -v yum &> /dev/null; then - yum install -y postgresql-server postgresql-contrib python3-psycopg2 + yum install -y postgresql-server postgresql-contrib postgresql-devel else log_error "Unsupported package manager" exit 1 @@ -189,7 +189,7 @@ ENABLE_BLOCK_PRODUCTION=false GOSSIP_BROADCAST_URL=redis://127.0.0.1:6379 CROSS_SITE_REMOTE_ENDPOINTS= MEMPOOL_BACKEND=database -MEMPOOL_DB_URL=postgresql+psycopg://aitbc_mempool:aitbc_mempool_password@localhost:5432/aitbc_mempool +MEMPOOL_DB_URL=postgresql+psycopg2://aitbc_mempool:aitbc_mempool_password@localhost:5432/aitbc_mempool EOF chmod 600 "$ENV_FILE" log_info "Created $ENV_FILE with chain ID: $CHAIN_ID"