Docs
Browser & PGLite

Extensions in WASM

Which PostgreSQL extensions load in the browser PGLite WASM build — and which heavyweight extensions don't.

Running Postgres in WebAssembly means the extension story is different from a normal Postgres server. Pure-SQL and many lighter C extensions can load in the WASM build; some heavyweight, deeply system-integrated extensions cannot.

Loads in WASM

These work in the browser PGLite build:

pgvector

Vector similarity search — store embeddings and run nearest-neighbor queries entirely client-side.

pg_trgm

Trigram matching for fuzzy text search and similarity, available in the WASM engine.

pgvector in the browser
create extension if not exists vector;

create table items (
  id        serial primary key,
  embedding vector(3)
);

insert into items (embedding) values ('[1,0,0]'), ('[0,1,0]'), ('[0.9,0.1,0]');

-- nearest neighbours to [1,0,0]
select id, embedding
from items
order by embedding <-> '[1,0,0]'
limit 2;

Does not run in WASM

Some extensions depend on background workers, custom storage, or system integration that the WASM sandbox doesn't provide. These are not available in the browser build:

TimescaleDB

Time-series extension with background workers and custom storage — not available in the WASM build.

Citus

Distributed Postgres scale-out — relies on a multi-node server topology that doesn't apply in a browser engine.

The rule of thumb: lightweight, in-process extensions (like pgvector and pg_trgm) load in WASM; extensions that need background workers, custom storage engines, or a multi-node cluster (like TimescaleDB and Citus) do not.

Browser engine vs. deployed database

This page describes the browser (PGLite) extension surface. Extension availability on a deployed Silos database (the PostgreSQL 18 server engine) is covered separately — see SQL extensions. Don't assume the two surfaces are identical; confirm an extension is available on the engine you'll actually deploy to.

Extension support is evolving as the WASM engine matures. Verify that a given extension loads and behaves as you expect before depending on it, especially for anything beyond the commonly-supported set above.

On this page