pgedge_vectorizer
pgedge_vectorizer · Asynchronous text chunking and embedding generation for PostgreSQL using background workers and pgvector.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101110 | pgedge_vectorizer | pgedge_vectorizer | 1.1 | RAG | PostgreSQL | C |
PostgreSQL · 14, 15, 16, 17, 18
| Relationships | |
|---|---|
| Requires | vector |
Usage
Sources:
pgedge_vectorizer asynchronously chunks table text and generates pgvector embeddings with OpenAI, Voyage AI, or Ollama. Triggers create queue work and background workers populate generated chunk tables, so source-row commit and embedding availability are separate events.
Prerequisites and Configuration
The extension requires PostgreSQL 14 or later, vector, libcurl, and an embedding provider. Add the library and target databases before restarting PostgreSQL:
The PostgreSQL service account must be able to read the key file; keep it out of SQL settings, backups, and logs. A preload or worker-count change requires restart.
Core Workflow
enable_vectorization creates supporting triggers, queue state, and a chunk table. Use disable_vectorization, retry_failed, and clear_completed for lifecycle operations; review the drop_chunk_table choice before disabling.
Operational Notes
Provider calls are external, asynchronous side effects. Expect rate limits, retries, duplicate attempts, model outages, and a period in which source data exists without embeddings. Monitor queue age and failures, make downstream reads tolerate lag, and re-embed deliberately after model, dimension, or chunking changes.
The control file requires superuser installation, is non-relocatable, and depends on vector. Generated chunk tables, triggers, queue metadata, GUCs, key files, provider connectivity, and background workers all belong in backup/restore and disaster-recovery tests. Restrict configuration and monitoring APIs because text chunks, errors, and outbound requests can contain sensitive data.