<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: TechiesJournal</title>
    <description>The latest articles on DEV Community by TechiesJournal (@techiesjournal).</description>
    <link>https://dev.to/techiesjournal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4245081%2F3f1243ea-70d3-42a2-b5d2-ef0e71ee50f3.png</url>
      <title>DEV Community: TechiesJournal</title>
      <link>https://dev.to/techiesjournal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/techiesjournal"/>
    <language>en</language>
    <item>
      <title>Pulumi and Terraform Can Work Together: What Actually Changes for Infrastructure Teams?</title>
      <dc:creator>TechiesJournal</dc:creator>
      <pubDate>Sun, 15 Nov 2026 07:12:40 +0000</pubDate>
      <link>https://dev.to/techiesjournal/pulumi-and-terraform-can-work-together-what-actually-changes-for-infrastructure-teams-20eh</link>
      <guid>https://dev.to/techiesjournal/pulumi-and-terraform-can-work-together-what-actually-changes-for-infrastructure-teams-20eh</guid>
      <description>&lt;p&gt;&lt;em&gt;Pulumi’s 2026 interoperability improvements let organizations retain Terraform workflows, share infrastructure modules across languages and run HCL through the Pulumi engine. The options reduce some migration barriers, but each has different implications for state, execution and resource ownership.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;An infrastructure team may have years of work invested in Terraform modules, deployment pipelines and production state. Moving to another infrastructure-as-code platform can mean rewriting configuration, changing delivery processes and validating resources that already work.&lt;/p&gt;

&lt;p&gt;Pulumi’s August 2026 release expands the ways teams can use Terraform, OpenTofu (an open-source Terraform-compatible implementation) and Pulumi together without replacing everything at once. The release brings together three capabilities: Terraform state and execution through Pulumi Cloud, Terraform module interoperability across languages, and HCL (HashiCorp Configuration Language, the language of Terraform configuration files) as a Pulumi programming language. These are different approaches. Understanding that distinction is more useful than treating the release as a single migration feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three capabilities, three different changes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;What changes&lt;/th&gt;
&lt;th&gt;What remains important&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Terraform backend and remote execution&lt;/td&gt;
&lt;td&gt;Terraform state and optional execution move to Pulumi Cloud&lt;/td&gt;
&lt;td&gt;Terraform or OpenTofu workflows remain, with remote execution subject to Pulumi Cloud’s execution model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terraform module interoperability&lt;/td&gt;
&lt;td&gt;Existing modules can be published, consumed and reused across supported languages&lt;/td&gt;
&lt;td&gt;Module execution, dependencies and compatibility still require validation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pulumi HCL runtime&lt;/td&gt;
&lt;td&gt;HCL configuration runs on the Pulumi engine&lt;/td&gt;
&lt;td&gt;Pulumi state and resource ownership replace the Terraform execution model&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The difference begins with two concepts. &lt;strong&gt;Configuration&lt;/strong&gt; describes the infrastructure a team wants. &lt;strong&gt;State&lt;/strong&gt; records the real resources associated with an infrastructure management workflow.&lt;/p&gt;

&lt;p&gt;Moving state storage does not necessarily change the engine that applies configuration. Running the same HCL through a different engine, however, changes more than the location of a state file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.pulumi.com/releases/terraform-state-backend-modules-hcl/" rel="noopener noreferrer"&gt;Source: Pulumi, &lt;em&gt;Full Support for Terraform State, Modules and HCL&lt;/em&gt;, August 2026&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Keep Terraform and use Pulumi Cloud for state
&lt;/h2&gt;

&lt;p&gt;A team can continue writing HCL and running familiar Terraform or OpenTofu commands while storing state in Pulumi Cloud. The backend provides centralized state management, locking, access controls, update history and visibility into managed resources. This arrangement does not turn Terraform-managed resources into Pulumi-engine-managed resources. The existing workflow can remain largely intact.&lt;/p&gt;

&lt;p&gt;Pulumi Cloud also offers remote execution, but this must be distinguished from using it only as a state backend. With &lt;strong&gt;local execution&lt;/strong&gt;, the Terraform or OpenTofu CLI runs operations in the team’s own environment while Pulumi Cloud stores the state. With &lt;strong&gt;remote execution&lt;/strong&gt;, the CLI sends configuration to Pulumi Cloud, where managed infrastructure performs the plan or apply.&lt;/p&gt;

&lt;p&gt;An important implementation detail is that Pulumi Cloud’s remote runner uses &lt;strong&gt;OpenTofu as its execution engine&lt;/strong&gt;, even when the operation was initiated through the Terraform CLI. The managed OpenTofu version is currently controlled by Pulumi Cloud rather than selected by the customer.&lt;/p&gt;

&lt;p&gt;Remote execution also has specific limitations, including unsupported &lt;code&gt;-var&lt;/code&gt; flags and the absence of configurable custom executor images. Those differences matter for teams whose existing pipelines depend on particular Terraform versions, command-line arguments or runner customization.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://www.techiesjournal.com/pulumi-terraform-interoperability-state-modules-hcl/10533/" rel="noopener noreferrer"&gt;Interactive figure: view it in the original article&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.pulumi.com/docs/integrations/terraform/state-backend/" rel="noopener noreferrer"&gt;Sources: Pulumi, &lt;em&gt;Store Terraform State in Pulumi Cloud&lt;/em&gt;&lt;/a&gt; and &lt;a href="https://www.pulumi.com/docs/integrations/terraform/remote-execution/" rel="noopener noreferrer"&gt;&lt;em&gt;Remote Execution for Terraform and OpenTofu&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Share Terraform modules across languages
&lt;/h2&gt;

&lt;p&gt;Terraform modules often represent established infrastructure standards. A platform team might maintain modules for networks, databases, storage or access controls. Rewriting these components solely because another team wants to use Python or TypeScript creates work and introduces potential differences. Pulumi’s interoperability features provide two related approaches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module registry and generated components.&lt;/strong&gt; Teams can publish Terraform modules to Pulumi Cloud’s private registry. The platform can expose them to Terraform and OpenTofu consumers and generate typed components for Pulumi-supported languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Any HCL Module integration.&lt;/strong&gt; Pulumi programs can use existing Terraform modules through an integration that uses OpenTofu to execute the module, maps supplied inputs to Terraform variables and exposes the results as Pulumi outputs.&lt;/p&gt;

&lt;p&gt;The Any HCL Module mechanism manages its module resources through the Pulumi state backend. It is not the same thing as independently running an existing Terraform root configuration with its original state. Generated SDKs can provide typed inputs and outputs, while dynamic module loading offers more flexibility at the expense of some type safety.&lt;/p&gt;

&lt;p&gt;The practical benefit is reusing tested infrastructure definitions across teams with different programming preferences. The remaining responsibility is compatibility testing. Modules with complex provider dependencies or execution assumptions still need validation in their intended environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.pulumi.com/docs/integrations/terraform/modules/" rel="noopener noreferrer"&gt;Source: Pulumi, &lt;em&gt;Use Terraform Modules in Pulumi&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Run HCL through the Pulumi engine
&lt;/h2&gt;

&lt;p&gt;The third capability changes the infrastructure execution model. Pulumi supports HCL as a language for its engine. Teams can retain familiar &lt;code&gt;.tf&lt;/code&gt; configuration syntax while using Pulumi’s resource lifecycle and state management. This may reduce the effort required to evaluate Pulumi without rewriting an entire configuration into another programming language.&lt;/p&gt;

&lt;p&gt;However, &lt;strong&gt;Terraform state does not automatically become Pulumi state&lt;/strong&gt;. Existing resources must be brought under Pulumi management through an explicit import process.&lt;/p&gt;

&lt;p&gt;Pulumi documents the following mechanism for HCL migrations:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pulumi import --from hcl &amp;lt;statefile&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The import reads an existing Terraform state file and maps resources into the Pulumi stack. It is a migration operation, not an instruction to run two independent engines against the same infrastructure resources.&lt;/p&gt;

&lt;p&gt;Before using this approach, teams must validate provider mappings, resource identities, dependencies and the resulting preview. They should avoid simultaneous management of the same resources by independent state systems.&lt;/p&gt;

&lt;p&gt;There are also compatibility differences. For example, Terraform &lt;code&gt;backend&lt;/code&gt; and certain other configuration settings are accepted but ignored with warnings because Pulumi manages state independently. A Terraform &lt;code&gt;cloud&lt;/code&gt; block is not accepted. Provisioner connection support is limited, including no WinRM support.&lt;/p&gt;

&lt;p&gt;Pulumi’s engineering team reported in &lt;a href="https://www.pulumi.com/blog/terraforms-data-model-on-pulumis-engine/" rel="noopener noreferrer"&gt;Emulating Terraform on Pulumi’s Engine&lt;/a&gt; that its HCL interpreter ran 56 of the 58 most-used Terraform AWS modules, which is 96%, and that the failures were due to ephemeral resources. That is a vendor-reported result for a particular set of AWS modules, not evidence that 96% of every organization’s Terraform configurations will migrate successfully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.pulumi.com/docs/iac/languages-sdks/hcl/" rel="noopener noreferrer"&gt;Sources: Pulumi, &lt;em&gt;HCL Documentation&lt;/em&gt;&lt;/a&gt;, &lt;a href="https://www.pulumi.com/docs/iac/languages-sdks/hcl/hcl-language-reference/" rel="noopener noreferrer"&gt;&lt;em&gt;HCL Language Reference&lt;/em&gt;&lt;/a&gt;, and &lt;a href="https://www.pulumi.com/blog/terraforms-data-model-on-pulumis-engine/" rel="noopener noreferrer"&gt;&lt;em&gt;Emulating Terraform on Pulumi’s Engine&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should teams choose?
&lt;/h2&gt;

&lt;p&gt;Return to the infrastructure team from the opening, and suppose it operates an established Terraform environment but wants to introduce Pulumi for new application infrastructure. This is a hypothetical team, used here to compare the options. There is no requirement to migrate everything at once.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Existing requirement&lt;/th&gt;
&lt;th&gt;Approach to evaluate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Better centralized state management&lt;/td&gt;
&lt;td&gt;Pulumi Cloud Terraform backend&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Managed Terraform or OpenTofu execution&lt;/td&gt;
&lt;td&gt;Pulumi Cloud remote execution, after validating its OpenTofu-based runner&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shared Terraform modules across language ecosystems&lt;/td&gt;
&lt;td&gt;Pulumi Cloud module registry and generated components&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terraform modules inside Pulumi programs&lt;/td&gt;
&lt;td&gt;Any HCL Module integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HCL configuration managed by the Pulumi engine&lt;/td&gt;
&lt;td&gt;Pulumi HCL with explicit state and resource import&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stable existing infrastructure with no compelling migration need&lt;/td&gt;
&lt;td&gt;Retain the current Terraform workflow&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The right choice depends on the operational problem. A new state backend may help a team that needs centralized controls. Shared modules may help organizations supporting multiple programming languages. A different execution engine may make sense when a team wants Pulumi’s broader programming model.&lt;/p&gt;

&lt;p&gt;None of those benefits automatically justifies migrating an established, working infrastructure estate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Operational boundaries that still matter
&lt;/h2&gt;

&lt;p&gt;Three areas deserve particular attention before production adoption.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resource ownership.&lt;/strong&gt; Each resource must have one clearly defined management path. Teams should know which engine applies changes and which state system records the resource.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Policy and drift detection.&lt;/strong&gt; Pulumi Cloud can run audit policies against Terraform-managed stacks, which its documentation lists for the Essentials, Pro and Enterprise editions. Preventative policies that block a violating apply are available through remote execution, documented for the Pro and Enterprise editions. However, automated drift detection is not currently available for Terraform-managed stacks. Organizations may need scheduled plans or another existing monitoring process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost and execution constraints.&lt;/strong&gt; Terraform resources stored in Pulumi Cloud count toward resources under management. Remote execution consumes billable workflow minutes. Teams should also account for provider versions, runner limitations and existing deployment integration requirements. Provider upgrades are a common source of such constraints, as &lt;a href="https://www.techiesjournal.com/terraform-aws-provider-upgrade-process/7118/" rel="noopener noreferrer"&gt;The Terraform AWS Provider Keeps Growing: Is Your Upgrade Process Ready?&lt;/a&gt; explains.&lt;/p&gt;

&lt;p&gt;These are not reasons to reject interoperability. They are part of determining whether a particular integration improves the organization’s current operating model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.pulumi.com/docs/integrations/terraform/remote-execution/" rel="noopener noreferrer"&gt;Sources: Pulumi, &lt;em&gt;Remote Execution for Terraform and OpenTofu&lt;/em&gt;&lt;/a&gt; and &lt;a href="https://www.pulumi.com/docs/integrations/terraform/state-backend/" rel="noopener noreferrer"&gt;&lt;em&gt;Store Terraform State in Pulumi Cloud&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical adoption path
&lt;/h2&gt;

&lt;p&gt;Teams can evaluate interoperability without launching a broad migration. If the objective is state management, test the backend with a representative non-production Terraform stack. Confirm that initialization, state migration, locking and planning work as expected.&lt;/p&gt;

&lt;p&gt;If the objective is module reuse, select a module with meaningful dependencies and verify its behavior through the chosen integration. If the objective is Pulumi-engine adoption, test the HCL runtime with a controlled resource import and verify that the resulting preview contains no unintended changes.&lt;/p&gt;

&lt;p&gt;These tests answer different questions. A successful backend migration does not prove HCL runtime compatibility. A reusable module does not prove the entire Terraform estate can move without redesign. The goal should be a verified improvement in the current workflow, not simply adoption of another tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the release actually changes
&lt;/h2&gt;

&lt;p&gt;Pulumi’s August 2026 interoperability improvements give infrastructure teams more ways to preserve existing Terraform investments while adopting selected Pulumi capabilities. They do not make Terraform, OpenTofu and Pulumi identical.&lt;/p&gt;

&lt;p&gt;The important distinction is between &lt;strong&gt;where state is stored, how modules are reused and which engine manages resources&lt;/strong&gt;. Organizations that understand those boundaries can adopt interoperability incrementally while maintaining clearer ownership and more predictable infrastructure changes.&lt;/p&gt;




&lt;h2&gt;
  
  
  References and further reading
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://www.pulumi.com/releases/terraform-state-backend-modules-hcl/" rel="noopener noreferrer"&gt;Pulumi, &lt;em&gt;Full Support for Terraform State, Modules and HCL&lt;/em&gt;&lt;/a&gt;. August 2026.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.pulumi.com/blog/terraform-state-backend-pulumi-cloud/" rel="noopener noreferrer"&gt;Pulumi, &lt;em&gt;Now Generally Available: Store Terraform State in Pulumi Cloud&lt;/em&gt;&lt;/a&gt;. March 5, 2026.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.pulumi.com/docs/integrations/terraform/state-backend/" rel="noopener noreferrer"&gt;Pulumi, &lt;em&gt;Store Terraform State in Pulumi Cloud&lt;/em&gt;&lt;/a&gt;. Official technical documentation.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.pulumi.com/docs/integrations/terraform/remote-execution/" rel="noopener noreferrer"&gt;Pulumi, &lt;em&gt;Remote Execution for Terraform and OpenTofu&lt;/em&gt;&lt;/a&gt;. Official execution behavior and limitations.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.pulumi.com/docs/integrations/terraform/modules/" rel="noopener noreferrer"&gt;Pulumi, &lt;em&gt;Use Terraform Modules in Pulumi&lt;/em&gt;&lt;/a&gt;. Module interoperability.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.pulumi.com/docs/iac/languages-sdks/hcl/" rel="noopener noreferrer"&gt;Pulumi, &lt;em&gt;HCL Language Documentation&lt;/em&gt;&lt;/a&gt;. Engine and state compatibility.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.pulumi.com/docs/iac/languages-sdks/hcl/hcl-language-reference/" rel="noopener noreferrer"&gt;Pulumi, &lt;em&gt;HCL Language Reference&lt;/em&gt;&lt;/a&gt;. Unsupported features and migration requirements.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.pulumi.com/blog/terraforms-data-model-on-pulumis-engine/" rel="noopener noreferrer"&gt;Pulumi, &lt;em&gt;Emulating Terraform on Pulumi’s Engine&lt;/em&gt;&lt;/a&gt;. August 4, 2026.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Source verification: November 5, 2026. Capabilities and compatibility claims are based on Pulumi’s published documentation and engineering reports. TechiesJournal has not independently tested these production migrations. The 96 percent figure was checked against the footnote of Pulumi’s own post.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.techiesjournal.com/pulumi-terraform-interoperability-state-modules-hcl/10533/" rel="noopener noreferrer"&gt;TechiesJournal&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>devops</category>
      <category>iac</category>
      <category>pulumi</category>
    </item>
    <item>
      <title>PostgreSQL and pgvector: When Should AI Applications Use a Separate Vector Database?</title>
      <dc:creator>TechiesJournal</dc:creator>
      <pubDate>Sun, 15 Nov 2026 06:22:18 +0000</pubDate>
      <link>https://dev.to/techiesjournal/postgresql-and-pgvector-when-should-ai-applications-use-a-separate-vector-database-4oc1</link>
      <guid>https://dev.to/techiesjournal/postgresql-and-pgvector-when-should-ai-applications-use-a-separate-vector-database-4oc1</guid>
      <description>&lt;p&gt;&lt;em&gt;An AI application can keep business records, embeddings and searchable documents in PostgreSQL, or introduce a dedicated vector system. The right decision depends on retrieval quality, access controls, scaling requirements and the cost of keeping multiple data stores synchronized.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;An organization building an AI knowledge assistant may already store its documents, users and permissions in PostgreSQL. To make those documents searchable by meaning, the application needs embeddings. These are numerical representations of content that allow software to find semantically related passages.&lt;/p&gt;

&lt;p&gt;One option is to store embeddings alongside application data using the pgvector extension. Another is to maintain a separate vector-search system. Both architectures can support retrieval-augmented generation (RAG).&lt;/p&gt;

&lt;p&gt;The question is whether a separate database solves a measurable problem or introduces complexity that the application does not yet need.&lt;/p&gt;

&lt;h2&gt;
  
  
  What pgvector adds to PostgreSQL
&lt;/h2&gt;

&lt;p&gt;PostgreSQL already provides relational storage, transactions, joins, indexing and full-text search. pgvector adds vector data types, similarity operators and approximate nearest-neighbor indexes, which find close matches quickly without checking every vector.&lt;/p&gt;

&lt;p&gt;An application can store document chunks, their embeddings and associated metadata in PostgreSQL. When a user asks a question, the application creates an embedding of that question and searches for similar document embeddings. The retrieved passages can then provide context to a language model generating an answer.&lt;/p&gt;

&lt;p&gt;pgvector does not generate embeddings, enforce the correctness of model-generated answers or automatically determine whether a document is safe for a particular user to read. Those remain responsibilities of the application and its security architecture.&lt;/p&gt;

&lt;p&gt;Importantly, &lt;strong&gt;pgvector is an extension, not a PostgreSQL 19 feature&lt;/strong&gt;. Its existing capabilities work across supported PostgreSQL versions, and the pgvector README lists support for PostgreSQL 13 and later, so check which versions your release supports. For what changes in PostgreSQL itself, see &lt;a href="https://www.techiesjournal.com/postgresql-19-release-candidate-features-upgrade-readiness/10588/" rel="noopener noreferrer"&gt;our article on PostgreSQL 19 and its release candidate&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/pgvector/pgvector" rel="noopener noreferrer"&gt;Source: pgvector official documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How an enterprise RAG application retrieves documents
&lt;/h2&gt;

&lt;p&gt;Consider a hypothetical internal knowledge assistant used by Finance and Human Resources employees. The organization stores documents and access metadata in PostgreSQL. Each document is divided into searchable passages, with an embedding associated with each passage.&lt;/p&gt;

&lt;p&gt;A typical retrieval operation has several stages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Authenticate the user.&lt;/strong&gt; The application establishes the user’s identity and authorized organizational context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Determine the permitted document scope.&lt;/strong&gt; The server identifies which documents the user is entitled to access, using trusted authorization data rather than user-supplied instructions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Generate the question embedding.&lt;/strong&gt; An embedding model converts the user’s question into the same compatible vector representation used for the stored passages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Retrieve matching passages.&lt;/strong&gt; PostgreSQL searches for semantically similar content while applying the appropriate document-access conditions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Enforce the access boundary.&lt;/strong&gt; The application verifies that only permitted content can be passed to the model. Database-side row-level security can provide another enforcement layer where correctly configured.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Generate the response.&lt;/strong&gt; The language model uses authorized passages as supporting context. The application can retain source references for traceability.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://www.techiesjournal.com/postgresql-pgvector-ai-vector-database-architecture/10780/" rel="noopener noreferrer"&gt;Interactive figure: view it in the original article&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Suppose a Finance employee asks about an expense-approval policy. A Human Resources document might be semantically similar, but similarity does not make that document authorized. The database query and surrounding application controls must prevent restricted material from entering the model’s context.&lt;/p&gt;

&lt;h3&gt;
  
  
  PostgreSQL row-level security
&lt;/h3&gt;

&lt;p&gt;PostgreSQL row-level security (RLS) can restrict which records a database role may read or modify. It can help enforce tenant or document boundaries independently of ordinary application filtering.&lt;/p&gt;

&lt;p&gt;However, enabling RLS does not automatically make every connection safe. Superusers and roles with &lt;code&gt;BYPASSRLS&lt;/code&gt; bypass policies. Table owners normally bypass RLS unless &lt;code&gt;FORCE ROW LEVEL SECURITY&lt;/code&gt; is configured. Applications also need to establish authorization context safely, especially when connections are pooled or reused.&lt;/p&gt;

&lt;p&gt;RLS should be tested with realistic user roles, including negative tests proving that unauthorized documents cannot be retrieved. An ordinary &lt;code&gt;WHERE tenant_id = ...&lt;/code&gt; clause is useful for query filtering, but should not be treated as a complete security boundary when the calling application can alter or omit it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.postgresql.org/docs/current/ddl-rowsecurity.html" rel="noopener noreferrer"&gt;Source: PostgreSQL, Row Security Policies&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exact search and approximate indexes solve different problems
&lt;/h2&gt;

&lt;p&gt;By default, pgvector performs exact nearest-neighbor search. This finds the nearest matching vectors under the selected distance measure, providing a useful baseline against which approximate results can be evaluated. As vector collections and request volumes grow, exact search may become more expensive.&lt;/p&gt;

&lt;p&gt;pgvector supports two principal approximate indexing methods.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Index&lt;/th&gt;
&lt;th&gt;How it works&lt;/th&gt;
&lt;th&gt;Important trade-off&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;HNSW&lt;/td&gt;
&lt;td&gt;Organizes vectors into a navigable graph&lt;/td&gt;
&lt;td&gt;Strong speed and recall characteristics for many workloads, with additional build time and memory requirements&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IVFFlat&lt;/td&gt;
&lt;td&gt;Groups vectors into lists and searches selected lists&lt;/td&gt;
&lt;td&gt;Requires suitable training data and tuning of search breadth&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Approximate indexes can return different results from exact search. That is why latency alone is an insufficient performance measure. Teams should also measure &lt;strong&gt;recall&lt;/strong&gt;, which indicates how many expected nearest-neighbor results were retrieved compared with an exact-search baseline.&lt;/p&gt;

&lt;p&gt;For an AI assistant, a faster result may be less useful if an important document is consistently omitted.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/pgvector/pgvector#hnsw" rel="noopener noreferrer"&gt;Source: pgvector, Indexing&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filtering can affect retrieval quality
&lt;/h2&gt;

&lt;p&gt;Enterprise searches rarely depend on vector similarity alone. Results may also be filtered by organization, document type, project or access scope. With approximate indexes, PostgreSQL can apply filtering after the index scan has selected candidates, and this can return fewer results than requested.&lt;/p&gt;

&lt;p&gt;For example, if a search examines 40 candidates and only 10% satisfy a category filter, approximately four may remain on average. That is an illustration of selectivity, not a guaranteed outcome for every search.&lt;/p&gt;

&lt;p&gt;pgvector introduced iterative index scans in &lt;strong&gt;version 0.8.0 on October 30, 2024&lt;/strong&gt;. Iterative scans can continue examining more index candidates when filtering removes too many results, subject to configured resource and scan limits. Other approaches include ordinary PostgreSQL indexes, partial vector indexes and table partitioning, depending on query patterns. These mechanisms should be selected through measurement.&lt;/p&gt;

&lt;p&gt;Tenants that share one approximate index can also affect each other. The pgvector documentation says vectors from one tenant can change recall and speed for other tenants, and recommends list partitioning or separate tables for tenant isolation.&lt;/p&gt;

&lt;p&gt;A correctly enforced authorization filter must never be weakened merely to increase the number of search results. A retrieval system returning fewer authorized passages may produce a less complete answer. Returning unauthorized passages is a different and more serious failure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/pgvector/pgvector/blob/master/CHANGELOG.md" rel="noopener noreferrer"&gt;Sources: pgvector changelog&lt;/a&gt;, &lt;a href="https://github.com/pgvector/pgvector#filtering" rel="noopener noreferrer"&gt;pgvector filtering guidance&lt;/a&gt; and &lt;a href="https://github.com/pgvector/pgvector#multitenancy" rel="noopener noreferrer"&gt;pgvector multitenancy&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hybrid search combines different forms of relevance
&lt;/h2&gt;

&lt;p&gt;Semantic similarity is useful when users describe a concept without using the exact wording found in a document. Keyword search remains important for identifiers, product names, policy numbers and technical terms.&lt;/p&gt;

&lt;p&gt;PostgreSQL supports full-text search through facilities such as &lt;code&gt;tsvector&lt;/code&gt; and &lt;code&gt;tsquery&lt;/code&gt;. Applications can combine those results with pgvector similarity search. For example, a knowledge assistant searching for a specific incident number may benefit from exact text matching, while a broader troubleshooting question may benefit from semantic retrieval.&lt;/p&gt;

&lt;p&gt;Ranked results can be combined using techniques such as reciprocal rank fusion, which merges two ranked lists by position, then optionally reranked using another relevance model. However, hybrid search does not guarantee better retrieval in every application. Teams should evaluate representative questions, expected documents and final ranking quality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.postgresql.org/docs/current/textsearch-intro.html" rel="noopener noreferrer"&gt;Sources: PostgreSQL full-text search&lt;/a&gt; and &lt;a href="https://github.com/pgvector/pgvector#hybrid-search" rel="noopener noreferrer"&gt;pgvector hybrid search&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When does a separate vector database become useful?
&lt;/h2&gt;

&lt;p&gt;A dedicated vector system may become worthwhile when an application’s retrieval requirements exceed what its existing PostgreSQL environment can support effectively. Examples include independently scaling vector-search traffic, specialized distributed indexing, very large search collections or retrieval features that are unavailable in the chosen PostgreSQL deployment.&lt;/p&gt;

&lt;p&gt;But moving embeddings to another system creates additional responsibilities.&lt;/p&gt;

&lt;p&gt;Consider a document update. The application changes the source document in PostgreSQL. It must also regenerate affected embeddings and update the vector index. Until synchronization finishes, searches may retrieve outdated content.&lt;/p&gt;

&lt;p&gt;Deletion creates a related problem. Removing a document from the transactional database must also remove or invalidate its vector representations.&lt;/p&gt;

&lt;p&gt;Permission changes are particularly important. If a user’s access is revoked, stale access metadata in another search system must not allow restricted content to reach the model.&lt;/p&gt;

&lt;p&gt;An architecture with two data stores therefore needs a reliable way to propagate changes, handle failures, retry safely and determine when search data is current. Change-data capture, which streams changes out of the database, transactional outbox patterns, which record the change event in the same transaction as the data, and event processing can help, but each requires implementation and operational ownership. The authoritative permission check should remain enforceable even when the search index is delayed.&lt;/p&gt;

&lt;p&gt;These synchronization boundaries are part of the cost of adopting a separate vector system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Embedding models introduce another migration boundary
&lt;/h2&gt;

&lt;p&gt;An embedding is generated using a particular model and representation. Changing the embedding model may change vector dimensions, distributions and similarity behavior. Embeddings produced by incompatible models should not be combined as though their distances were directly comparable.&lt;/p&gt;

&lt;p&gt;Organizations should record embedding-model identifiers, versions and relevant generation settings. A model migration may require generating new embeddings, rebuilding indexes and evaluating retrieval quality before switching production queries. During a transition, old and new representations may need to coexist.&lt;/p&gt;

&lt;p&gt;pgvector also has indexing limits that depend on the representation. Its documented HNSW support includes &lt;code&gt;vector&lt;/code&gt; values up to 2,000 dimensions and &lt;code&gt;halfvec&lt;/code&gt; values up to 4,000 dimensions. These limits concern the relevant index representation, not a universal restriction on every possible storage or search strategy. The application’s embedding-model choice therefore affects index design.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/pgvector/pgvector" rel="noopener noreferrer"&gt;Source: pgvector, Vector Types and Indexing Limits&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How should a team choose?
&lt;/h2&gt;

&lt;p&gt;A useful evaluation compares the existing PostgreSQL approach with a separate vector system using the same representative workload.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Evaluation area&lt;/th&gt;
&lt;th&gt;Question to answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Retrieval quality&lt;/td&gt;
&lt;td&gt;Are expected relevant passages consistently found?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authorization&lt;/td&gt;
&lt;td&gt;Can unauthorized documents ever reach the model context?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance&lt;/td&gt;
&lt;td&gt;Does search latency meet the target under realistic concurrency?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Filtering&lt;/td&gt;
&lt;td&gt;Do selective tenant and metadata conditions preserve acceptable recall?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Updates and deletions&lt;/td&gt;
&lt;td&gt;How quickly does the search index reflect source changes?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Operations&lt;/td&gt;
&lt;td&gt;What are the indexing, backup, monitoring and recovery requirements?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scaling&lt;/td&gt;
&lt;td&gt;Can retrieval demand grow without harming transactional workloads?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;What is the combined infrastructure and maintenance expense?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The comparison should not assume that the most specialized technology is automatically the most suitable. A small or moderately sized application may find that PostgreSQL with pgvector meets its needs with fewer systems to manage. A larger application may justify an independent search tier when workload isolation, specialized features or independent scaling delivers measurable benefits. Those outcomes are workload-dependent and should be established through tests, not generic database-size thresholds.&lt;/p&gt;

&lt;p&gt;Operations also include keeping the extension patched. The pgvector changelog records fixes for possible index corruption during HNSW vacuuming in version 0.8.3 on June 17, 2026, and for buffer overflows during IVFFlat index builds in versions 0.8.6 on July 29 (on 32-bit systems) and 0.8.7 on October 1, 2026. Teams should run a current patch release and test index maintenance, such as vacuuming and rebuilds, before relying on an index in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/pgvector/pgvector/blob/master/CHANGELOG.md" rel="noopener noreferrer"&gt;Source: pgvector, Changelog&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the architecture decision comes down to
&lt;/h2&gt;

&lt;p&gt;PostgreSQL and pgvector allow application records, embeddings, metadata and text search to remain within one database environment. This can simplify AI applications that already depend heavily on relational data. A separate vector system may provide valuable capabilities, but requires attention to synchronization, deletions, authorization and operational ownership.&lt;/p&gt;

&lt;p&gt;Neither architecture automatically guarantees search relevance or secure retrieval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start with verified retrieval and access-control requirements. Use PostgreSQL with pgvector when it meets them effectively, and introduce a separate vector system when measurements justify the additional complexity.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References and further reading
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/pgvector/pgvector" rel="noopener noreferrer"&gt;pgvector, Official Repository&lt;/a&gt;. Supported vector types, similarity search, indexing, filtering and multitenancy.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/pgvector/pgvector/blob/master/CHANGELOG.md" rel="noopener noreferrer"&gt;pgvector, Changelog&lt;/a&gt;. Version history, iterative index scans and patch releases.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.postgresql.org/docs/current/ddl-rowsecurity.html" rel="noopener noreferrer"&gt;PostgreSQL, Row Security Policies&lt;/a&gt;. Database authorization behavior and bypass conditions.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.postgresql.org/docs/current/textsearch.html" rel="noopener noreferrer"&gt;PostgreSQL, Full Text Search&lt;/a&gt;. Keyword retrieval and ranking.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.postgresql.org/docs/current/textsearch-intro.html" rel="noopener noreferrer"&gt;PostgreSQL, Full Text Search Introduction&lt;/a&gt;. The &lt;code&gt;tsvector&lt;/code&gt; and &lt;code&gt;tsquery&lt;/code&gt; types.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.postgresql.org/docs/current/sql-explain.html" rel="noopener noreferrer"&gt;PostgreSQL, EXPLAIN&lt;/a&gt;. Execution-plan inspection and performance evaluation.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/pgvector/pgvector/releases" rel="noopener noreferrer"&gt;pgvector, Release and Security History&lt;/a&gt;. Extension releases and maintenance updates.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Sources verified November 6, 2026. pgvector releases often, and the 0.8.7 release on October 1, 2026 fixed an IVFFlat index build bug and is not presented as introducing the architectural capabilities discussed here, so check the sources above before you act. Performance and architecture guidance are analytical recommendations, not independent TechiesJournal benchmark results.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.techiesjournal.com/postgresql-pgvector-ai-vector-database-architecture/10780/" rel="noopener noreferrer"&gt;TechiesJournal&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>ai</category>
      <category>database</category>
    </item>
  </channel>
</rss>
