Skip to content

Add PostgreSQL Index Profile Support#81

Merged
MikeAlhayek merged 4 commits into
mainfrom
ma/add-postgresql
May 26, 2026
Merged

Add PostgreSQL Index Profile Support#81
MikeAlhayek merged 4 commits into
mainfrom
ma/add-postgresql

Conversation

@MikeAlhayek

@MikeAlhayek MikeAlhayek commented May 25, 2026

Copy link
Copy Markdown
Member

Now we can create IndexProfile using PostgreSQL in additional to Elasticsearch and AzureAISearch!

This pull request introduces first-class support for PostgreSQL (with pgvector) as a vector search backend for both core and AI-powered features in the CrestApps.Core ecosystem. It adds new primitives, updates dependency management, and provides comprehensive documentation and configuration guidance. The PostgreSQL provider is now available as an alternative to Elasticsearch and Azure AI Search for RAG (retrieval-augmented generation) and indexing scenarios.

Key changes include:

PostgreSQL Provider Integration:

  • Added new projects: CrestApps.Core.PostgreSQL and CrestApps.Core.AI.PostgreSQL, enabling PostgreSQL + pgvector support for vector search, AI documents, memory, and data sources, with all required service registrations under the "PostgreSQL" provider name. [1] [2] [3]
  • Registered PostgreSQL-specific services (ISearchIndexManager, ISearchDocumentManager, IDataSourceContentManager, IDataSourceDocumentReader, IODataFilterTranslator) and AI extensions (AddAIDocuments(), AddAIDataSources(), AddAIMemory()) for seamless integration into MVC and Blazor hosts. [1] [2]

Dependency and Package Management:

  • Added Npgsql and Pgvector NuGet packages for PostgreSQL and vector support, and included Aspire.Hosting.PostgreSQL for streamlined local development and deployment using .NET Aspire. [1] [2]

Documentation and Developer Experience:

  • Introduced a detailed PostgreSQL provider documentation page, including setup instructions, configuration samples, Docker Compose for local development, and troubleshooting. The new doc is linked in the sidebar navigation. [1] [2]
  • Updated the v1.0.0 changelog to reflect the addition of PostgreSQL/pgvector as a supported backend for vector search and AI features.

… user-controlled sources'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@MikeAlhayek

Copy link
Copy Markdown
Member Author

@copilot fix build

Co-authored-by: MikeAlhayek <24724371+MikeAlhayek@users.noreply.github.com>

Copilot AI commented May 26, 2026

Copy link
Copy Markdown
Contributor

@copilot fix build

Build is fixed in commit a39db47 by replacing the non-static NpgsqlCommandBuilder.QuoteIdentifier(...) call with PostgreSQLHelpers.QuoteIdentifier(...) in PostgreSQLSearchIndexManager.DeleteAsync.

Comment thread src/Primitives/CrestApps.Core.PostgreSQL/Services/PostgreSQLSearchIndexManager.cs Dismissed
@MikeAlhayek MikeAlhayek merged commit 0a9b311 into main May 26, 2026
10 checks passed
@MikeAlhayek MikeAlhayek deleted the ma/add-postgresql branch May 26, 2026 02:34
@vlad2kgithub

Copy link
Copy Markdown

@MikeAlhayek, are Elasticsearch and AzureAISearch not transactional databases like PostgreSQL? What am I missing?

@MikeAlhayek

Copy link
Copy Markdown
Member Author

@vlad2kgithub Yes — PostgreSQL is typically the transactional system of record, while the other two are primarily search/indexing engines used for retrieval.

In our case, we’re using PostgreSQL to also store vector data for AI features. It’s not replacing a search engine; it’s simply serving as an additional persistence layer for AI-related embeddings alongside the rest of the application data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants