Tuesday, 20 October 2026

18 entries · final
Concept of the day · databases

Connection Pooling and Pool Exhaustion

A Postgres connection is a process; the pool is the real concurrency limit.

The mechanism. Each PostgreSQL connection is an OS process with its own memory (work_mem is per operation, per connection). A few hundred of them will exhaust a server that handles thousands of queries per second happily on twenty. So you put a pool in front: application-side (HikariCP, pg.Pool, SQLAlchemy) or a proxy (PgBouncer, pgcat, RDS Proxy).

The counterintuitive result. Throughput peaks at a small pool. The useful rule of thumb is roughly cores * 2 + effective_spindle_count. Beyond that, connections queue inside the database instead of outside it, context switching and lock contention rise, and p99 gets worse while the dashboard still shows idle CPU.

Pool exhaustion. The failure looks like a hang, not an error: every connection is checked out, and new requests block on acquisition until they time out. Three usual causes — a transaction left open across an HTTP call or a slow external API; a leaked connection on an error path that never returns it; and N+1 queries multiplying hold time. Always set an acquisition timeout, or a slow database becomes an unavailable application.

Transaction vs session pooling. PgBouncer in transaction mode multiplexes connections per transaction, which is far more efficient but breaks anything relying on session state: prepared statements, SET, advisory locks, LISTEN/NOTIFY, temp tables.

Takeaway. Your concurrency limit is the pool size, whether you chose it or not. Pick it deliberately and set a timeout on acquisition.

0 of 18 read

Top Reads

5

Articles and engineering write-ups worth the full read.

One Hash Bloom Filters

calabro.io·Lobsters +1·75 points / 10 comments·2 sourcescompscidatabasesthread →

Dynamic Packages

getlazarus.org·Lobsters +1·198 points / 51 comments·2 sourceseditorsreleasethread →

I no longer care to work on any Ruby gems so I've archived all my repositories

po-ru.com·Hacker News·443 points / 426 commentsthread →

What the heck is /pkg?

anderegg.ca·Lobsters +1·44 points / 13 comments·2 sourcesmacunixthread →

Beginning of the Ende (a community Deno fork)

blog.webb.page·Lobsters·30 points / 21 commentsjavascriptthread →

Shipped

4

Releases, changelogs, cloud and language news.

Introducing Clairic, a new System One class of extraction models

Today, we're announcing a preview of a new class of System One-style models: extraction models. Our first one, Clairic, is available hosted on Workers AI as @cf/cloudflare/clairic. We intend to release the model open-weights soon. Clairic is an extraction model that is able to extract, compute, estimate, and forecast values from unstructured inputs — all at a significantly higher accuracy, fa

blog.cloudflare.com·Cloudflare +1·52 points / 4 comments·2 sourcesaidevelopersmachine learningthread →

Blocking Identity Resolution Infrastructure

Apple and WebKit have shipped protections against web tracking for a long time. We put privacy protections in place for cookies in the very first version of Safari, we invented storage and cache partitioning and shipped it ten years before other major browsers, and we’re actively fighting device fingerprinting. We do this because users deserve to not be tracked, not across websites and not covertl

webkit.org·WebKitprivacylanguage

Stefanie Janine Stölting: pgsql_tweaks Version 1.1.0 Released

pgsql_tweaks is a bundle of functions and views for PostgreSQL Changes In The pgsql_tweaks 1.1.0 Release pgsql_tweaks is a bundle of functions and views for PostgreSQL The source code is available on Codeberg . The extension is also available on PGXN . The extension is also availabe through the PostgreSQL rpm packages . Changes In The pgsql_tweaks 1.1.0 Release This release adds a new view to the

postgr.es·Planet PostgreSQLcloudinfra

[Launched] Generally Available: Metrics usage insights for Azure Monitor workspace

Metrics usage insights is now generally available, giving you greater visibility into what’s driving metrics usage across your Azure Monitor workspace. Monitor workspace utilization, identify unused metrics, understand usage trends, and investigate change

azure.microsoft.com·Azure Updateslauncheddevopsmanagement and governance

Repos

3

Projects gaining real traction, and what they actually do.

Harness2 by Google Research – Recursive Agent Harnessing

github.com·Hacker News +1·74 points / 18 comments·2 sourcespythonthread →

labuladong/fucking-algorithm

Crack LeetCode, not only how, but also why.

github.com·GitHubmarkdownalgorithmscomputer-science

Chalarangelo/30-seconds-of-code

Coding articles to level up your development skills

github.com·GitHubjavascriptastroawesome-list

Discussion

2

Threads where the comments are the content.

Ask HN: How to deal with shipping AI-written code you don't understand?

I saw this LinkedIn post from a Meta engineer and it resonated with me: https://www.linkedin.com/posts/ali-hamie_im-an-engineer-at-m... > I'm an engineer at Meta and I never felt this uncomfortable doing my job. I'm writing code these days and it all feels like a black box. This new standard of shipping with AI is moving so fast that if we're going to spend our t

news.ycombinator.com·Hacker News·333 points / 479 comments

Updates to site guidelines and AI/LLM tags

Hey folks, I've been having to perform an increasing number of [moderation actions](https://lobste.rs/moderations?moderator=355E3B) surrounding the `vibecoding` tag and AI/LLM related content. I started reading Lobsters because it had the most interesting viewpoints related to computing. During that time, I've found that this community is at it's best when it's trying to, in good faith, help other

lobste.rs·Lobsters·324 points / 275 commentsannouncemeta

AI

3

Capped on purpose, so it does not eat the edition.

Anthropic and the changing nature of work

The research field known as cognitive systems engineering (CSE) emerged in the early 1980s as a subfield of safety science. That time period saw a dramatic rise in the use of computer-based automation for controlling safety-critical systems. One of the big ideas of CSE, I would even call it the big idea of the field, is that introducing new automation changes the nature of the work that humans do.

surfingcomplexity.blog·Surfing Complexitycognitive-systems-engineeringblog

If you don't run your own LLM proxy, how do you know whats going on?

jrdsgl.com·Hacker News·295 points / 210 commentsthread →

Feast Feature and Vector Serving at ScyllaDB Speed

A new and tighter integration between Feast and ScyllaDB online feature store, including vector search support and better performance Starting with Feast v0.65, you can build with a new and tighter integration between Feast and ScyllaDB online feature stores, including vector search support and better performance. This post covers what changed, what tends to push teams to outgrow their online… Sou

scylladb.com·ScyllaDBecosystemfeature storeai/ml

Deep

1

One paper or long teardown.

SARP: An On-SSD Index for KVCache with Fast Prefix Matching and Recovery

Distributed LLM serving relies on a global index to locate reusable key-value cache (KVCache) blocks through prefix matching. Losing the index after a crash or restart forces affected requests to recompute existing KVCache on GPUs. Persisting the index restores access after a failure. Existing persistent indexes face a tension between prefix-matching performance and recovery time. A snapshot-backe

arxiv.org·arXiv CScs.dbpaper

Revision

1 from earlier editions

Answer each one before you open it.

How does MVCC let a reader avoid blocking on a concurrent writer?3d ago

Readers never block writers because each sees its own snapshot of history.

Concept · MVCC