<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/everyone-into-the-pool-mo3kijgek" -->

---
title: Everyone into the Pool | daily.dev
description: A detailed comparison of five PostgreSQL connection poolers — Pgpool-II, PgBouncer, Amazon RDS Proxy, PgCat, and PgDog — examining how each handles session...
canonical: https://daily.dev/posts/everyone-into-the-pool-mo3kijgek
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Everyone into the Pool | daily.dev
og:description: A detailed comparison of five PostgreSQL connection poolers — Pgpool-II, PgBouncer, Amazon RDS Proxy, PgCat, and PgDog — examining how each handles session...
og:url: https://daily.dev/posts/everyone-into-the-pool-mo3kijgek
og:image: https://api.daily.dev/og/posts/Mo3KIJgEk.png
og:image:alt: Everyone into the Pool
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Everyone into the Pool

**[Planet PostgreSQL](https://daily.dev/sources/planet-postgresql)** · 16 min read · 0 upvotes · 0 comments

## Summary

A detailed comparison of five PostgreSQL connection poolers — Pgpool-II, PgBouncer, Amazon RDS Proxy, PgCat, and PgDog — examining how each handles session state (SET commands, prepared statements, advisory locks, LISTEN/NOTIFY) under transaction pooling. Pgpool-II (since 2003) only supports session pooling and is being superseded by dedicated failover tools. PgBouncer (since 2007, now 1.26.0) remains the default lightweight choice, tracking more server parameters since PostgreSQL 18 closed the long-standing search_path leak. RDS Proxy pins sessions aggressively on any SET statement, which can silently defeat pooling for ORMs like Rails. PgCat, written in Rust, is effectively abandoned since 2025. PgDog, built by the same author as PgCat, parses SQL with PostgreSQL's own parser to replay session state faithfully and adds sharding, read/write splitting, and two-phase commit, though it remains a fast-moving 0.1.x project under AGPL-3.0. Concrete recommendations are given per use case.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://postgr.es/p/9w_>

## Questions this post answers

### Does PgBouncer 1.26.0 still leak SET search_path between clients in transaction pooling mode?

No, as of PostgreSQL 18 this particular leak is closed because PostgreSQL 18 now reports search_path back to the client, and PgBouncer 1.26.0 tracks everything the server reports. Other SET statements, such as statement_timeout, still leak to the next client in transaction mode unless you use SET LOCAL instead.

_Developers tuning pooler configs around session-state leaks can track changes like this on daily.dev._

### Why does Amazon RDS Proxy stop pooling my PostgreSQL connections even though I configured transaction-level multiplexing?

RDS Proxy pins a client to its server connection whenever it detects something it cannot safely multiplex, including any SET or set_config call, SQL-level PREPARE/EXECUTE/DEALLOCATE/DISCARD, temporary tables, sequences, views, cursors, LISTEN, session-level advisory locks, or nextval/setval calls. Rails and similar ORMs issue SET statements on every new connection, so those sessions get pinned from the start, meaning you pay per vCPU-hour for what is effectively session pooling. The CloudWatch metric DatabaseConnectionsCurrentlySessionPinned shows how often this happens.

_Teams evaluating RDS Proxy against their ORM's connection behavior can follow details like this on daily.dev._

### How does PgDog handle SET statements and session state differently from PgBouncer in transaction pooling mode?

PgDog parses SQL using PostgreSQL's own parser via pg_query and records each client's SET parameters, then compares them against the server connection's state before every transaction, issuing whatever SET commands are needed to replay the client's session accurately. This differs from PgBouncer, which only tracks a handful of parameters reported back over the wire protocol and otherwise lets SET state leak between clients. PgDog also pins connections for session-level pg_advisory_lock() or CREATE TEMP TABLE.

_Engineers choosing a pooler that must preserve session state can research options like PgDog on daily.dev._

## Similar posts on daily.dev

- [Transaction pooling for Postgres with pgcat](https://daily.dev/posts/transaction-pooling-for-postgres-with-pgcat-0lwwslzpi) · Phil Eaton · 0 upvotes · 0 comments
- [Does anyone run Postgres without PgBouncer?](https://daily.dev/posts/does-anyone-run-postgres-without-pgbouncer--kpfxapce0) · Lobsters · 55 upvotes · 9 comments
- [Connection pooling strategies in Amazon Aurora DSQL](https://daily.dev/posts/connection-pooling-strategies-in-amazon-aurora-dsql-g4hpbgqfy) · AWS Database Blog · 0 upvotes · 0 comments
- [Google Introduces Managed Connection Pooling for AlloyDB](https://daily.dev/posts/google-introduces-managed-connection-pooling-for-alloydb-3jt7lyzbz) · InfoQ · 0 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/everyone-into-the-pool-mo3kijgek)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Everyone into the Pool","url":"https://daily.dev/posts/everyone-into-the-pool-mo3kijgek","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/everyone-into-the-pool-mo3kijgek"},"datePublished":"2026-10-05T16:02:35.201Z","dateModified":"2026-10-05T16:03:42.258Z","description":"A detailed comparison of five PostgreSQL connection poolers — Pgpool-II, PgBouncer, Amazon RDS Proxy, PgCat, and PgDog — examining how each handles session...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0ebfdf30f2d164567e535aef4cb905a5?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0ebfdf30f2d164567e535aef4cb905a5?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet PostgreSQL","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet PostgreSQL","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/planet-postgresql"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/everyone-into-the-pool-mo3kijgek","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,postgresql","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet PostgreSQL","item":"https://daily.dev/sources/planet-postgresql"},{"@type":"ListItem","position":3,"name":"Everyone into the Pool"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/everyone-into-the-pool-mo3kijgek#faq","mainEntity":[{"@type":"Question","name":"Does PgBouncer 1.26.0 still leak SET search_path between clients in transaction pooling mode?","acceptedAnswer":{"@type":"Answer","text":"No, as of PostgreSQL 18 this particular leak is closed because PostgreSQL 18 now reports search_path back to the client, and PgBouncer 1.26.0 tracks everything the server reports. Other SET statements, such as statement_timeout, still leak to the next client in transaction mode unless you use SET LOCAL instead. Developers tuning pooler configs around session-state leaks can track changes like this on daily.dev."}},{"@type":"Question","name":"Why does Amazon RDS Proxy stop pooling my PostgreSQL connections even though I configured transaction-level multiplexing?","acceptedAnswer":{"@type":"Answer","text":"RDS Proxy pins a client to its server connection whenever it detects something it cannot safely multiplex, including any SET or set_config call, SQL-level PREPARE/EXECUTE/DEALLOCATE/DISCARD, temporary tables, sequences, views, cursors, LISTEN, session-level advisory locks, or nextval/setval calls. Rails and similar ORMs issue SET statements on every new connection, so those sessions get pinned from the start, meaning you pay per vCPU-hour for what is effectively session pooling. The CloudWatch metric DatabaseConnectionsCurrentlySessionPinned shows how often this happens. Teams evaluating RDS Proxy against their ORM's connection behavior can follow details like this on daily.dev."}},{"@type":"Question","name":"How does PgDog handle SET statements and session state differently from PgBouncer in transaction pooling mode?","acceptedAnswer":{"@type":"Answer","text":"PgDog parses SQL using PostgreSQL's own parser via pg_query and records each client's SET parameters, then compares them against the server connection's state before every transaction, issuing whatever SET commands are needed to replay the client's session accurately. This differs from PgBouncer, which only tracks a handful of parameters reported back over the wire protocol and otherwise lets SET state leak between clients. PgDog also pins connections for session-level pg_advisory_lock() or CREATE TEMP TABLE. Engineers choosing a pooler that must preserve session state can research options like PgDog on daily.dev."}}]}
```

