Blog Post

Microsoft Blog for PostgreSQL
12 MIN READ

Introducing Microsoft Fabric HorizonDB: Serverless PostgreSQL for applications, analytics, and AI

scoriani's avatar
scoriani
Icon for Microsoft rankMicrosoft
Nov 17, 2026

Modern data applications need historical context, curated business metrics, and increasingly, access to AI models. Those capabilities often live outside the operational database, leaving developers to build and maintain the connections between them.

We are introducing Microsoft Fabric HorizonDB, a new serverless PostgreSQL SaaS workload in the Fabric Databases portfolio, available in Preview bringing familiar PostgreSQL application database into Microsoft Fabric, with service-managed infrastructure, usage-based consumption, automatic pause and resume, and an integrated extension ecosystem for AI and search.

Fabric HorizonDB also connects the operational database to the rest of Fabric in three complementary ways:

  • mirror operational data into OneLake
  • query operational and analytical data through the same PostgreSQL endpoint
  • load curated analytical results back into PostgreSQL for application serving

The result is an architecture in which transactions, analytical processing, and low-latency serving can use the appropriate execution path while applications retain a PostgreSQL interface.

Figure 1 -  Operational data, remote analytical queries, and locally loaded insights have different storage and execution paths within Fabric.

PostgreSQL as a Fabric-native SaaS experience

Fabric HorizonDB is a native SaaS database workload, not a PostgreSQL instance running in a virtual machine that customers must administer. Create a database item in a supported Fabric workspace is a one-click experience, and users can connect through its PostgreSQL endpoint, and work with tables, relationships, transactions, indexes, and SQL using familiar PostgreSQL tools and drivers.

The service provides a versionless SaaS experience, initially backed by PostgreSQL 17. The platform selects the engine version and manages minor-version maintenance; provisioning does not require choosing an operating system, configuring a PostgreSQL host, or assembling a database image.

The architecture separates database compute from durable storage. Compute can stop when the database is idle without deleting the data. The logical database endpoint and configuration remain associated with the database item rather than with the lifetime of an individual compute instance.

This separation is also important when considering OneLake. PostgreSQL’s native tables and indexes live in the database’s durable storage. Mirroring publishes an analytical representation into OneLake; OneLake is not the underlying storage engine for PostgreSQL transactions.

The service manages infrastructure and server-level configuration. Developers still control the application data model: primary keys, constraints, indexes, SQL, and database-local permissions. SaaS removes infrastructure administration, not the need to design efficient queries.

For development, use the Fabric SQL editing experience or connect through Visual Studio Code and the PostgreSQL extension. Microsoft Entra authentication provides the supported identity foundation, with authorization applied at the relevant Fabric and database boundaries.

Serverless consumption: active when needed, paused when idle

Fabric HorizonDB removes the need to provision and operate an always-on database server for intermittent application activity. Its serverless lifecycle combines service-assigned compute, automatic idle detection, and automatic resume.

After five consecutive minutes of eligible inactivity, the database automatically pauses its compute. Durable data remains available for the next activation. A new authorized connection, typically initiated when the application issues its next query, triggers resume through the same logical endpoint.

The five-minute interval is an idle-lifecycle rule, not simply a timer since the last SQL statement. Open customer connections can prevent the database from becoming eligible to pause. Applications should release idle connections and configure connection pools with this behavior in mind.

Automatic resume also does not mean that a paused connection remains usable or that the first request has zero startup latency. Applications should validate pooled connections, allow for resume in connection timeouts, and use bounded reconnect logic. If a transaction’s outcome is uncertain after a disconnect, reconcile it before replaying a write.

 

 

Figure 2 - Compute follows the database’s active lifecycle; durable data and the logical endpoint survive a pause.

Pay for active compute, not a continuously running server

Database compute consumption is accounted for through Fabric capacity while compute is active. When the database is paused, its compute consumption is zero. Retained storage is separate from active compute and does not become free simply because compute has paused.

This is usage-based consumption, not per-statement billing or a measurement of only the CPU cycles used by an individual query. While active, the database uses its assigned compute profile. In Preview, customers do not configure minimum and maximum vCore ranges or manage server resizing.

Analytical execution in Fabric Data Warehouse, Copy job data movement, and hosted AI inference are separate resource consumers billed through the respective workloads in Microsoft Fabric.

Moving work away from PostgreSQL does not make that work cost-free but it changes where the work executes and how its consumption is accounted for.

An AI-ready extension ecosystem, available out of the box

AI applications need several distinct capabilities: invoke a model, store embeddings, retrieve relevant records, and combine those records with authoritative application data. Fabric HorizonDB provides a curated extension environment so developers do not have to build a custom PostgreSQL image or install native packages on a host.

The core AI and search extensions are provisioned by the service automatically, together with a rich ecosystem of mostly used PostgreSQL extensions:

Extension

Technical role

Application pattern

azure_ai

Invoke configured AI models from SQL for embeddings, generation, and enrichment.

Generate semantic-search embeddings, produce grounded briefs, or classify content.

vector

Store embeddings and perform vector similarity operations alongside relational data.

Retrieve relevant products, documents, or support records.

pg_diskann

Provide DiskANN approximate-nearest-neighbor indexing for vector retrieval.

Build an indexed retrieval path over an embedding collection.

pg_textsearch

Provide relevance-oriented text search.

Retrieve records by keywords and combine lexical and semantic signals.

These are complementary building blocks. A vector index does not generate embeddings, and a model call does not make a response grounded in the database automatically.

For example, a retrieval-augmented application can store document embeddings with relational identifiers and access-control attributes, retrieve a bounded set of relevant records, and supply those authorized records to a model. The application should retain document references so users can inspect the basis for the generated answer.

The following illustrative PostgreSQL pattern stores embeddings and prepares a parameterized cosine-distance query. The embedding dimension must match the selected embedding model.

CREATE SCHEMA app; CREATE TABLE app.knowledge ( document_id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, content text NOT NULL, embedding vector(1536) NOT NULL ); PREPARE find_context (vector) AS SELECT document_id, content FROM app.knowledge ORDER BY embedding <=> $1 LIMIT 5;

This first example assumes embeddings are already available and binds the query embedding as $1. It defines the retrieval operation but does not create an approximate-nearest-neighbor index. For larger collections, use the supported vector-index configuration and inspect the execution plan rather than assuming every similarity query is indexed.

Out-of-the-box extension availability does not grant access to a model deployment. Model selection, authentication, permissions, quotas, and inference costs remain explicit dependencies that required Microsoft Foundry provisioning and management.

From a natural-language question to semantic search

The next step is to generate both the stored document vectors and the query vector through azure_ai. Its embedding function is exposed as azure_openai.create_embeddings: the function’s SQL schema is azure_openai, while the extension providing it is azure_ai.

Before running this example, register an authorized text-embedding-3-small deployment under the model alias knowledge-embedding using the supported model-registry setup, and grant the caller permission to use it. The example requests 1,536 dimensions to match app.knowledge.embedding; it does not assume that a model deployment or alias is automatically provisioned.

First, populate the table created above with a small illustrative knowledge base. Generate each document’s embedding during ingestion and persist the result, rather than calling a model to re-embed every document on every search:

INSERT INTO app.knowledge (content, embedding) SELECT d.content, azure_openai.create_embeddings( model => 'knowledge-embedding', input => d.content, dimensions => 1536, timeout_ms => 10000 )::vector(1536) FROM (VALUES ('Reset your password using the self-service account recovery flow.'), ('Export invoice history as a CSV file from the billing page.'), ('Configure organizational single sign-on with Microsoft Entra ID.') ) AS d(content);

Next, accept a natural-language question as a bound text parameter. Generate its embedding once, then compare that vector with the stored document vectors:

PREPARE semantic_search (text) AS WITH query_embedding AS MATERIALIZED ( SELECT azure_openai.create_embeddings( model => 'knowledge-embedding', input => $1, dimensions => 1536, timeout_ms => 10000 )::vector(1536) AS embedding ) SELECT k.document_id, k.content, k.embedding <=> ( SELECT embedding FROM query_embedding ) AS cosine_distance FROM app.knowledge AS k ORDER BY k.embedding <=> ( SELECT embedding FROM query_embedding ) LIMIT 5; EXECUTE semantic_search( 'How do I regain access when I cannot remember my login credentials?' );

The search returns up to five records ranked by cosine distance, where a smaller distance means a closer match. It compares meaning encoded by the embedding model rather than requiring identical keywords. The materialized query vector prevents a model call for every candidate row, while ordering directly by the distance operator preserves the nearest-neighbor query shape.

Use the same embedding model version and dimensions for documents and queries. Recompute affected embeddings when content changes, and rebuild or version the corpus when changing models. For a larger corpus, use bounded ingestion batches rather than holding an application write transaction open across many inference calls. Enforce the caller’s document-access scope before returning matches or passing them to a generation model, and surface model failures rather than substituting empty vectors or fabricated results.

For a grounded business application, the database can first assemble current operational facts and locally loaded analytical measures, then invoke a configured model through azure_ai. Keep authoritative calculations in SQL and use the model to explain the results, not to recompute financial totals or invent missing values.

 

 

Figure 3 - HorizonDB supplies authorized grounding data; the model executes at its configured inference endpoint.

Mirror HorizonDB data to Fabric: operational changes in OneLake

Applications write to PostgreSQL using its normal transactional interface. Fabric HorizonDB’s transparent database mirroring makes supported operational data available in OneLake without requiring application teams to build a separate extraction pipeline.

Mirroring performs an initial copy and then asynchronously propagates committed changes into an analytical representation. In Fabric, that representation uses analytics-ready Delta tables and is exposed through a read-only SQL analytics endpoint.

This creates a different access path for analytical workloads. Instead of making every dashboard or historical aggregation scan the operational PostgreSQL tables, analytical consumers can work with the mirrored data through Fabric’s analytical experiences, including SQL, Spark, and Power BI, subject to their own configuration and permissions.

For the underlying platform model, see OneLake overview and Mirroring in Fabric.

Query Fabric data from HorizonDB: beyond the database’s own mirror

Making operational data available to analytics is only one direction. Applications also need analytical context: historical activity, curated dimensions, business classifications, or metrics maintained by another team.

The pg_fabric_fdw integration exposes supported Fabric SQL endpoints as PostgreSQL foreign tables. This includes the database’s own mirrored analytical endpoint and other supported Warehouse and Lakehouse SQL assets that the executing identity is authorized to access.

The application can therefore query those sources using PostgreSQL SQL without first persisting their entire contents into the operational database.

Foreign tables reference analytical data where they are

The database’s mirrored endpoint has a service-provided foreign-server binding named fabric_dw. After mirroring and the supported authentication path are ready, import the relevant table definitions into a PostgreSQL schema.

This example assumes an existing application schema named oltp, with customers and orders tables that are eligible for mirroring:

CREATE SCHEMA olap; IMPORT FOREIGN SCHEMA oltp LIMIT TO (customers, orders) FROM SERVER fabric_dw INTO olap; SELECT foreign_table_schema, foreign_table_name, foreign_server_name FROM information_schema.foreign_tables WHERE foreign_table_schema = 'olap';

oltp.orders refers to the native PostgreSQL table; olap.orders is foreign metadata for its analytical representation. Importing the schema does not load the mirrored rows into PostgreSQL.

Additional supported Warehouse or Lakehouse SQL endpoints can be registered through the documented foreign-server and mapping DDL, with explicit authorization. Access is not restricted to the database’s own mirrored data or to a single analytical dataset.

The integration reads supported SQL-exposed assets. It is not unrestricted access to every file, folder, artifact type, or endpoint in OneLake, and registering a server does not grant permission to its data.

Keep the execution boundary visible

Consider a historical order-count query over the mirrored representation:

EXPLAIN (VERBOSE, COSTS OFF) SELECT customer_id, count(*) AS order_count FROM olap.orders WHERE ordered_at >= TIMESTAMP '2026-10-01 00:00:00' AND ordered_at < TIMESTAMP '2026-11-01 00:00:00' GROUP BY customer_id;

The plan is important. Where supported, filters, projections, joins, and aggregations can execute remotely, returning a smaller result to PostgreSQL. Unsupported expressions or query shapes can leave more work on the PostgreSQL side. Do not assume that a foreign-table reference automatically offloads every operation.

A hybrid query can then combine a bounded remote aggregate with current local customer attributes. Aggregate remote facts to the intended business grain before joining them to local tables, so a one-to-many join does not multiply measures.

 

 

Figure 4 - Foreign tables retain the PostgreSQL interface while supported analytical work executes through a Fabric SQL Analytical Endpoint.

Load Fabric data into HorizonDB: reverse ETL for operational serving

Query-time access is useful when an application needs selective or occasional analytical context. It is not always the right path for a dashboard or reporting API that repeatedly requests the same curated metrics at high concurrency.

In that case, bring a selected analytical result back into the operational serving tier.

Fabric Copy job provides the data-movement path from supported Fabric sources into native HorizonDB tables. A curated dataset in a Warehouse or Lakehouse can become a local PostgreSQL serving projection: physically stored rows, with PostgreSQL keys and indexes, queried without a remote analytical dependency on every request.

This is reverse ETL: analytical processing produces trusted results, then a data-movement job delivers those results into an operational store for applications to consume.

From curated dataset to indexed serving table

Consider a customer dashboard that needs current account details together with a rolling sales metric and a business tier calculated in Fabric.

CREATE SCHEMA serving; CREATE TABLE serving.customer_insights ( customer_id bigint PRIMARY KEY, net_sales_90d numeric(20, 2) NOT NULL, customer_tier text NOT NULL, snapshot_id text NOT NULL, calculated_at timestamptz NOT NULL ); PREPARE customer_dashboard (bigint) AS SELECT c.customer_id, c.region_id, i.net_sales_90d, i.customer_tier, i.snapshot_id, i.calculated_at FROM oltp.customers AS c LEFT JOIN serving.customer_insights AS i ON i.customer_id = c.customer_id WHERE c.customer_id = $1;

Rather than repeatedly scanning analytical history, publish one curated row per customer and load it into a local serving table. An illustrative destination and application query are:

 

The DDL defines the destination; Copy job performs the transfer. A foreign-table SELECT is not a substitute for that load. In a production refresh flow, land a new batch, validate its keys and values, and publish it locally only after successful delivery.

The primary key supports an indexed customer lookup and enforces the projection’s grain. The application combines that local result with current operational data. A missing insight remains distinguishable from a measured zero, and the snapshot identifier and calculation time expose the result’s provenance.

This pattern supports low-latency, high-throughput query serving for embedded dashboards, reporting APIs, and operational workbenches by avoiding repeated remote scans and network round trips. Actual latency and throughput depend on the database profile, indexes, result size, concurrency, and competing transactional work; loading a table does not create unlimited serving capacity.

Freshness is a publication contract

The local projection is current as of its successful source calculation and load, not necessarily as of the application’s latest transaction.

Track the source batch, calculation time, Copy job outcome, and local publication time. Check row counts, uniqueness, mappings, and business values before exposing a new batch. Use a staged, transactionally controlled local publication when readers must not observe a partially refreshed result.

Copy job supports several delivery modes across Fabric, but the available combination depends on the source and destination connector. Start with a supported bounded snapshot. Use recurring or incremental delivery only where the HorizonDB connector documents the required behavior; a schedule alone does not establish CDC, delete propagation, upserts, or exactly-once processing.

The general Copy job model is documented in What is Copy job?. Consult the HorizonDB-specific connector guidance for its supported modes.

 

 

Figure 5 - Curated OneLake results are physically loaded into PostgreSQL so repeated serving queries can remain local.

Choose the data path for the workload

These capabilities solve different problems and can be used together:

Requirement

Data path

Important boundary

Analyze operational data with Fabric engines.

Mirror HorizonDB data to OneLake.

Asynchronous analytical copy; not transactional read-after-write.

Read the mirror or another supported Warehouse/Lakehouse dataset from PostgreSQL.

Query foreign tables through pg_fabric_fdw.

Remote query dependency; no persisted local dataset.

Repeatedly serve a selected curated dataset with PostgreSQL indexes.

Load it through Copy job into local tables.

Physical data movement; freshness follows successful publication.

A customer-facing application might use PostgreSQL for current orders, query a Warehouse for occasional historical analysis, serve frequently requested metrics from a locally loaded projection, and generate an AI explanation from those authorized facts.

The architecture does not require every request to traverse every engine. Keep the latency-sensitive request path small, move broad analytical processing to the analytical tier where appropriate, and materialize only the results that need local serving.

Get started

Have a Fabric tenant administrator enable the Preview, then use an eligible workspace and capacity to create a database. Connect through the PostgreSQL endpoint, inspect the supported extension catalog, and begin with a small operational schema.

Next, observe mirroring readiness, import a limited set of foreign table definitions, and inspect a remote query plan. Finally, load a small curated snapshot through a real Copy job and compare a local serving lookup with the remote query path.

Review the Preview’s supported regions, limits, authentication paths, and connector capabilities before adopting a production workload.

Launch resources:

 

Fabric HorizonDB brings PostgreSQL into Fabric as a managed application database, then connects that database to the analytical and AI capabilities around it. The key is choosing deliberately: transact locally, analyze through the appropriate Fabric endpoint, and bring curated results back when the application needs a PostgreSQL serving path.

Updated Nov 17, 2026
Version 1.0
No CommentsBe the first to comment