---
title: "Live Share: Connect to in-browser PGlite with any Postgres client"
description: "database.build (formerly postgres.new) adds Live Share, which exposes an in-browser PGlite (WASM Postgres) database via a unique connection string usable from psql, pg_dump, ORMs or IDEs."
url: "https://swe.quest/articles/live-share-connect-to-in-browser-pglite-with-any-postgres-client-bc4a637942fe2ca5"
canonical: "https://supabase.com/blog/database-build-live-share"
source: "Supabase"
published: "2024-10-10"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 6
tags: ["postgres","networking","load-balancing","webassembly","browsers"]
---

# Live Share: Connect to in-browser PGlite with any Postgres client

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2024-10-10, 6 min read, Announcement. Original: [https://supabase.com/blog/database-build-live-share](https://supabase.com/blog/database-build-live-share)

## Summary

database.build (formerly postgres.new) adds Live Share, which exposes an in-browser PGlite (WASM Postgres) database via a unique connection string usable from psql, pg\_dump, ORMs or IDEs. A WebSocket-to-TCP proxy keeps a persistent WebSocket as a reverse tunnel to the browser, while pg-gateway terminates client TCP connections, handles startup, auth and the Postgres SSLRequest upgrade, and reads the TLS SNI server name to route each connection, since Postgres has no HOST header and off-the-shelf proxies can't do SNI routing behind its STARTTLS-style handshake. PGlite's single-connection limit breaks clients that open parallel connections (Prisma shadow DBs, DBeaver defaults), COPY FROM STDIN is unsupported, and multiplexing was rejected due to shared transaction and extended-query state.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [Load balancing](https://swe.quest/tags/load-balancing.md) (Infrastructure)
- [WebAssembly](https://swe.quest/tags/webassembly.md) (Languages)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)

## Prerequisites

- Postgres wire protocol basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- TLS and SNI ([easy posts on Cryptography](https://swe.quest/tags/cryptography.md?difficulty=easy))
- WebSockets ([easy posts on Real-time systems](https://swe.quest/tags/realtime.md?difficulty=easy))

## Keywords

PGlite, pg-gateway, database.build, Live Share, SNI, WebSocket, SSLRequest, Supabase

## Related posts

- [postgres.new: In-browser Postgres with an AI interface](https://swe.quest/articles/postgres-new-in-browser-postgres-with-an-ai-interface-55583d716a34d5b8.md): Supabase · 2024-08-12 · Medium · 11 min read · PostgreSQL, WebAssembly, LLMs, AI agents, Browsers
  database.build (formerly postgres.new) runs unlimited Postgres databases entirely in the browser via PGlite, a WASM build of Postgres, paired with GPT-4o that has full autonomy over the disposable database.
- [Postgres WASM by Snaplet and Supabase](https://swe.quest/articles/postgres-wasm-by-snaplet-and-supabase-a942df855beab1df.md): Supabase · 2022-10-03 · Medium · 9 min read · PostgreSQL, WebAssembly, Virtualization, Browsers, Networking
  postgres-wasm runs a full PostgreSQL 14 server in the browser by emulating an x86 machine with v86 rather than compiling Postgres to WASM directly.
- [psql from the browser](https://swe.quest/articles/psql-from-the-browser-f27b7186b8abd76b.md): Neon · 2024-12-11 · Easy · 3 min read · PostgreSQL, Browsers, Developer tools, Open source
  psql.sh is a browser-based emulation of Postgres's psql client, built on Neon's WebSocket proxy and serverless driver because browsers can't open raw TCP connections.
- [Edge-compatible Serverless Driver for Postgres](https://swe.quest/articles/edge-compatible-serverless-driver-for-postgres-9b0d09c6c7a067d0.md): Neon · 2022-12-08 · Medium · 9 min read · PostgreSQL, Serverless, Networking, Cryptography, WebAssembly
  Neon's @neondatabase/serverless driver lets V8-isolate platforms like Cloudflare Workers, which lack TCP, speak the real Postgres wire protocol by tunnelling it over a WebSocket to an open-source Go proxy that relays to TCP.
- [Quicker serverless Postgres connections](https://swe.quest/articles/quicker-serverless-postgres-connections-7a37a1071edd4362.md): Neon · 2023-03-28 · Medium · 8 min read · PostgreSQL, Networking, Serverless, Performance engineering, Cryptography
  Neon cut the network round-trips needed to get a first query result from its WebSocket-based serverless Postgres driver from nine to four.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
