From 8030c949f2a39fed4795dd412297af5c0332a2cb Mon Sep 17 00:00:00 2001 From: Andrej Milicevic Date: Fri, 16 Jan 2026 12:59:28 +0100 Subject: [PATCH] fix: minor changes from PR comments --- .github/workflows/vector_db_tests.yml | 2 +- .../databases/relational/sqlalchemy/SqlAlchemyAdapter.py | 2 +- .../databases/vector/pgvector/PGVectorDatasetDatabaseHandler.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/vector_db_tests.yml b/.github/workflows/vector_db_tests.yml index 6e9e34493..cc2071b72 100644 --- a/.github/workflows/vector_db_tests.yml +++ b/.github/workflows/vector_db_tests.yml @@ -149,7 +149,7 @@ jobs: VECTOR_DB_PORT: 5432 VECTOR_DB_USERNAME: cognee VECTOR_DB_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} - VECTOR_DATASET_DATABASE_HANDLER: pgvector + VECTOR_DATASET_DATABASE_HANDLER: pgvector_local run: uv run python ./cognee/tests/test_permissions.py run-lancedb-tests: diff --git a/cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py b/cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py index c416ab6b3..ca105782f 100644 --- a/cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py +++ b/cognee/infrastructure/databases/relational/sqlalchemy/SqlAlchemyAdapter.py @@ -559,7 +559,7 @@ class SQLAlchemyAdapter: # Connect to maintenance db in order to create new database # Make sure to execute CREATE DATABASE outside of transaction block, and set AUTOCOMMIT isolation level connection = await self.maintenance_engine.connect() - await connection.execution_options(isolation_level="AUTOCOMMIT") + connection = await connection.execution_options(isolation_level="AUTOCOMMIT") await connection.execute(text(f'CREATE DATABASE "{self.engine.url.database}";')) # Clean up resources diff --git a/cognee/infrastructure/databases/vector/pgvector/PGVectorDatasetDatabaseHandler.py b/cognee/infrastructure/databases/vector/pgvector/PGVectorDatasetDatabaseHandler.py index 6e5e23a5a..975a4bdc5 100644 --- a/cognee/infrastructure/databases/vector/pgvector/PGVectorDatasetDatabaseHandler.py +++ b/cognee/infrastructure/databases/vector/pgvector/PGVectorDatasetDatabaseHandler.py @@ -33,7 +33,7 @@ class PGVectorDatasetDatabaseHandler(DatasetDatabaseHandlerInterface): "username": vector_config.vector_db_username, "password": vector_config.vector_db_password, }, - "vector_dataset_database_handler": "pgvector", + "vector_dataset_database_handler": "pgvector_local", } from .create_db_and_tables import create_pg_database