---
title: "PgBouncer is now available in Supabase"
description: "Supabase now bundles PgBouncer, co-located on the same server as each new project's Postgres, so serverless functions that open a connection per request don't overwhelm the database."
url: "https://swe.quest/articles/pgbouncer-is-now-available-in-supabase-7611d240679e4c4c"
canonical: "https://supabase.com/blog/supabase-pgbouncer"
source: "Supabase"
published: "2021-04-02"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 4
tags: ["postgres","serverless","scalability"]
---

# PgBouncer is now available in Supabase

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2021-04-02, 4 min read, Announcement. Original: [https://supabase.com/blog/supabase-pgbouncer](https://supabase.com/blog/supabase-pgbouncer)

## Summary

Supabase now bundles PgBouncer, co-located on the same server as each new project's Postgres, so serverless functions that open a connection per request don't overwhelm the database. The pooler keeps a fixed set of connections open, currently a pool size of 15, and queues clients when all are busy rather than raising Postgres's connection limit. Three pool modes are available: session (full feature support), transaction (recommended for serverless, but no session features like prepared statements) and statement (no multi-statement transactions, suited to autocommit). Pooling applies to new projects only.

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)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)

## Prerequisites

- PostgreSQL connections ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- serverless functions ([easy posts on Serverless](https://swe.quest/tags/serverless.md?difficulty=easy))

## Keywords

PgBouncer, Supabase, PostgreSQL, Supavisor, PostgREST

## Related posts

- [Supavisor: Scaling Postgres to 1 Million Connections](https://swe.quest/articles/supavisor-scaling-postgres-to-1-million-connections-8585e4b9712f0334.md): Supabase · 2023-08-11 · Medium · 7 min read · PostgreSQL, Elixir & Erlang, Scaling, Multi-tenancy, Performance engineering
  Supavisor is a multi-tenant Postgres connection pooler written in Elixir that Supabase built to replace single-threaded PgBouncer.
- [Let Your AWS Lambdas Survive Thousands of Connections](https://swe.quest/articles/let-your-aws-lambdas-survive-thousands-of-connections-95ac0e1f5340c6dd.md): Neon · 2024-12-02 · Medium · 13 min read · Serverless, PostgreSQL, Cloud platforms, JavaScript, Scaling
  Lambda's per-instance database connections can overwhelm Aurora Serverless v2 during traffic spikes, causing connection exhaustion, lingering zombie connections and cold-start latency, and RDS Proxy adds cost, pinning issues and borrow latency without fully fixing it.
- [Supavisor 1.0: a scalable connection pooler for Postgres](https://swe.quest/articles/supavisor-1-0-a-scalable-connection-pooler-for-postgres-561015cc29e3cac0.md): Supabase · 2023-12-13 · Medium · 3 min read · PostgreSQL, Elixir & Erlang, Load balancing, Replication
  Supavisor 1.0, Supabase's Elixir-based Postgres connection pooler, is production-ready and adds query load balancing, named prepared statement support in transaction mode, and query cancelation.
- [PGKeeper: Building the bouncer we needed for Postgres](https://swe.quest/articles/pgkeeper-building-the-bouncer-we-needed-for-postgres-b0a410376e101175.md): Figma · 2026-05-04 · Medium · 19 min read · PostgreSQL, Resilience, Go, Databases, Scaling
  Figma replaced PgBouncer with PGKeeper, a Go service built on PGX that sits between its DBProxy router and each Postgres instance.
- [How we scale PgBouncer in ClickHouse Managed Postgres](https://swe.quest/articles/how-we-scale-pgbouncer-in-clickhouse-managed-postgres-130231ec324c9f46.md): ClickHouse · 2026-07-01 · Medium · 4 min read · PostgreSQL, Performance engineering, Load balancing, Linux, Scaling
  Because PgBouncer is single-threaded, ClickHouse Managed Postgres runs a fleet of PgBouncer processes sized to the core count, all binding one port via so\_reuseport so the kernel load-balances connections behind a single endpoint.

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)
