Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module integrates Drupal with PostgreSQL using the pgvector extension to enable vector searches for AI Search and other compatible modules. It handles creating tables, indexing and deleting data, and performing vector searches with or without filters, as well as basic PostgreSQL queries.

The Postgres VDB Provider is a database module that works together with the AI module, to allow you to do vector searches with AI Search or other modules that implement it.

The module provides integration with a Postgres database using pgvector, a vector database, and the AI module.

This module provides features such as creating the tables to store vectors and other indexed fields, the indexing of data, the deletion of indexed data, vector searches with and without filters and a basic Postgres query search.

Features

Postgres is a powerful, open source object-relational database system with a strong reputation for reliability, feature robustness, and performance. It is supported already by the majority of cloud providers and can easily be run locally.

Using the open source extension pgvector, Postgres can store and search upon vectors.

The open source nature and wide availability of this vector database management solution makes this a good candidate, especially for small to medium sized vector databases.

This module currently provides features such as creating the tables to store vectors and other indexed fields, the indexing of data, the deletion of indexed data, vector searches with and without filters and a non-vector query search.

Installation

Use composer to install this module and its dependencies.

Post-Installation

  • Enable the module
  • Configure the database connection
    • /admin/config/ai/vdb_providers/postgres
  • Create the Search API server
    • /admin/config/search/search-api/add-server
    • Select AI Search as the Backend
    • Configure the backend
      • Select Postgres vector DB as the Vector Database
      • Enter the database name
      • Enter the collection name (main table name)
      • Select the similarity metric to use in vector searches
      • Configure the rest of the AI Search backend as desired (see AI Search documentation)
      • When saved this will attempt to create the collection main table
  • Setup an index that uses the new server and configure as desired (see AI Search documentation)

Additional Requirements

  • PHP extension pgsql enabled on the web server
  • AI module
  • AI Search module
  • Key module
  • Search API module

Roadmap/TODO

  • Handle the changes to the table schema better
    • Work out where we can make these schema changes but keep user data for as long as possible
    • Potentially look to search_api_db to see how it solves this problem
    • Currently tables may have to be dropped by clearing the index for big schema changes
  • Investigate if this can use core’s db connection
  • Lots of calls are made to sanitise what could be user input, can these calls be cached for performance
  • Tests
  • Support for facets

Similar projects

Other AI Search VDB providers:

Thanks

Thanks to the maintainers of the AI and AI Search modules for building the underlying infrastructure.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Nov 2024
Latest release
4 months ago
Releases (12 mo)
1 ▼ from 3
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.0-alpha3 Pre-release 10–11 Apr 23, 2026
1.0.0-alpha2 Pre-release 10–11 May 27, 2025
1.0.0-alpha1 Pre-release 10–11 May 14, 2025
1.0.x-dev Dev 10–11 Nov 7, 2024