---
title: "Postgres Support Case Recap"
description: "The Postgres error \"remaining connection slots are reserved for non-replication superuser connections\" (SQLSTATE 53300) occurs when concurrent connections hit max_connections minus the slots reserved for superusers, e.g. 108 usable of 112 on a 0.25 CU Neon compute."
url: "https://swe.quest/articles/postgres-support-case-recap-c3361e4247de93d0"
canonical: "https://neon.com/blog/postgres-support-case-recap"
source: "Neon"
published: "2024-01-31"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["postgres","databases","serverless"]
---

# Postgres Support Case Recap

A post on [Neon](https://swe.quest/sources/neon.md), published 2024-01-31, 5 min read, How-to. Original: [https://neon.com/blog/postgres-support-case-recap](https://neon.com/blog/postgres-support-case-recap)

## Summary

The Postgres error "remaining connection slots are reserved for non-replication superuser connections" (SQLSTATE 53300) occurs when concurrent connections hit max\_connections minus the slots reserved for superusers, e.g. 108 usable of 112 on a 0.25 CU Neon compute. Neon derives max\_connections from compute RAM (max(100, min(RAM/9,531,392, 4000))), giving roughly 112 to 3154 connections across compute sizes. Fixes include finding and terminating idle or long-running sessions via pg\_stat\_activity and pg\_terminate\_backend, moving to a larger compute, or enabling PgBouncer connection pooling by adding a -pooler suffix to the endpoint hostname, which supports up to 10,000 client connections.

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)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)

## Prerequisites

- PostgreSQL basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- database connection strings ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))

## Keywords

Neon, PostgreSQL, PgBouncer, max\_connections, pg\_stat\_activity, SQLSTATE 53300

## Related posts

- [Using Neon’s Scale to Zero with Long-Running Applications](https://swe.quest/articles/using-neon-s-scale-to-zero-with-long-running-applications-bbe64dd8466d86d8.md): Neon · 2024-01-24 · Medium · 7 min read · PostgreSQL, Serverless, Resilience, JavaScript, Performance engineering
  Neon's scale to zero suspends a Postgres compute after an idle window (only when no WAL senders are active and autovacuum isn't running), which severs connections held by long-running servers.
- [PgBouncer is now available in Supabase](https://swe.quest/articles/pgbouncer-is-now-available-in-supabase-7611d240679e4c4c.md): Supabase · 2021-04-02 · Medium · 4 min read · PostgreSQL, Serverless, Scaling
  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.
- [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.
- [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.
- [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.

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)
