Skip to main content

Less than three weeks before Data Outpost. Get your ticket before they sell out.Join AI and Data builders Nov 4-5 in SF

MotherDuck Now Speaks Postgres: Fast Analytics Without Changing Your Stack

Apr 21, 2026Featuring: ,

TL;DR: MotherDuck's Postgres endpoint lets any Postgres-compatible client, driver, or BI tool query your MotherDuck database directly without a DuckDB library. Louisa Huang and Garrett O'Brien walk through the architecture, run live demos, and share connection pooling tips.

What the Postgres endpoint actually is

The Postgres endpoint is a translation layer that makes MotherDuck speak the Postgres wire protocol. Your application connects with a standard Postgres driver like node-postgres or JDBC, but execution still happens server-side on MotherDuck using DuckDB SQL. You keep your existing connection pooler and query patterns; MotherDuck handles the analytical work.

Why this matters if you're running analytics on Postgres

If your analytical queries are competing with transactional traffic on the same Postgres cluster, this gives you a way to split them apart. Analytical workloads route to MotherDuck through the same Postgres drivers your app already uses, so your Postgres instance stays lean. It also works in runtimes that couldn't load a DuckDB client before: Cloudflare Workers, Vercel Serverless Functions, AWS Lambda.

Live demo: NYC taxi dashboard on Vercel

Louisa builds a working NYC taxi dashboard with Next.js, Vercel, and node-postgres pointed at a free MotherDuck account on a Pulse instance. Every chart fires a query through the Postgres endpoint, and the dashboard stays responsive while aggregations run across millions of rows.

Connection pooling and read scaling

Connection pooling works the same way it does with a real Postgres database. Open connections at server start, reuse them. A pool size of 10 to 100 handles most applications. If you need higher concurrency, swap your regular MotherDuck token for a Read Scaling token. Each pooled connection gets routed to a separate ducklink, so you get horizontal scaling without changing application code.

When you still want the DuckDB client

The Postgres endpoint makes sense for embedded analytics, BI integrations, and serverless workloads. For exploratory analysis, bulk ingestion with the Appender API, or anything that benefits from DuckDB-Wasm in the browser, the DuckDB client is still the better fit. The MotherDuck getting started guide walks you through setting up a free workspace to try both.

FAQS

The Postgres endpoint is a translation layer that lets MotherDuck speak the PostgreSQL wire protocol. You connect with any Postgres-compatible driver like node-postgres, JDBC, or rust-postgres, and MotherDuck handles the type and metadata conversion. Queries still run on MotherDuck's server-side DuckDB instances, so you get DuckDB performance without replacing your existing Postgres tooling.

Yes. Popular drivers like node-postgres, JDBC, rust-postgres, and psycopg all work with the endpoint. You point your client at pg.<region>.motherduck.com on port 5432, use your MotherDuck token as the password, and connect over SSL. The wire protocol is Postgres, but the SQL dialect is DuckDB's, which is mostly compatible with Postgres SQL and has some of its own extensions.

Not yet. dbt support through the Postgres endpoint is actively in development. In the meantime, you can use dbt with MotherDuck through the dbt-duckdb adapter, which connects via the DuckDB client.

Use a connection pool the same way you would with a real Postgres database. Initial connections take a few hundred milliseconds for the TCP and TLS handshake and token authentication, so reusing pooled connections removes that overhead on subsequent queries. A pool size of 10 is reasonable for most applications; 100 covers higher-scale workloads. There is no hard connection limit, but standard Postgres pooling best practices apply.

Use the Postgres endpoint when you're building customer-facing applications, connecting BI tools, or running in serverless environments like Cloudflare Workers or Vercel that can't load native DuckDB libraries. Use the DuckDB client for exploratory analysis, bulk data ingestion using the Appender API, or when you want DuckDB-Wasm in the browser for ultra-low-latency interactions.

Related Videos

"Aligned on Numbers: How Our Chief of Staff Builds Internal Data Apps with Agents at MotherDuck" video thumbnail

44:21

Oct 15, 2026

Aligned on Numbers: A Chief of Staff's Data Apps

Zoey Weaver interviews Kaitlyn Henry, MotherDuck's Chief of Staff, as she walks through two internal data apps: an AI token spend tracker built on a Flight and a weekly business review Dive. She explains how Guides, markdown files that define the company's key metrics, keep everyone's numbers consistent.

Stream

MotherDuck Features

AI ML and LLMs

"Jev for Analytics: 5 Use Cases on Real Data" video thumbnail

43:57

Oct 8, 2026

Jev for Analytics: 5 Use Cases

Mehdi Ouazza uses MotherDuck's prompt_jev() to turn text columns into columns you can GROUP BY. He classifies 100,000 consumer complaints, then walks through five use cases on real data: AI agent logs, Hacker News sentiment, sales calls, and two kinds of job-ad analysis.

Stream

MotherDuck Features

AI ML and LLMs

"Virtual Workshop: Build a Data Agent in 60 Minutes" video thumbnail

51:58

Oct 1, 2026

Build a Data Agent in 60 Minutes

Jacob Matson walks through a working data chat agent he built: MCP tools, an agentic loop, a tuned system prompt, hard-coded read-only guardrails, and telemetry. He demos it live against a real dataset, walks through the actual codebase, then shows the same backend re-platformed into a Slack bot.

Stream

MotherDuck Features

AI ML and LLMs

Data Pipelines