<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/postgres-listen-notify-hits-60k-writes-sec-kafka-4-1-ships-elr-by-default-n15iuomsf" -->

---
title: Postgres LISTEN/NOTIFY hits 60K writes/sec, Kafka 4.1...
description: A batching fix to Postgres LISTEN/NOTIFY&#x27;s global lock bottleneck pushes throughput from 2.9K to 60K writes/second on a single server. Kafka 4.1 enables...
canonical: https://daily.dev/posts/postgres-listen-notify-hits-60k-writes-sec-kafka-4-1-ships-elr-by-default-n15iuomsf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Postgres LISTEN/NOTIFY hits 60K writes/sec, Kafka 4.1 ships ELR by default | daily.dev
og:description: A batching fix to Postgres LISTEN/NOTIFY&#x27;s global lock bottleneck pushes throughput from 2.9K to 60K writes/second on a single server. Kafka 4.1 enables...
og:url: https://daily.dev/posts/postgres-listen-notify-hits-60k-writes-sec-kafka-4-1-ships-elr-by-default-n15iuomsf
og:image: https://api.daily.dev/og/posts/N15iuOmsf.png
og:image:alt: Postgres LISTEN/NOTIFY hits 60K writes/sec, Kafka 4.1 ships ELR by default
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.

# Postgres LISTEN/NOTIFY hits 60K writes/sec, Kafka 4.1 ships ELR by default

**[Databases Digest](https://daily.dev/sources/databases_digest)** · 4 min read · 0 upvotes · 0 comments

## Summary

A batching fix to Postgres LISTEN/NOTIFY's global lock bottleneck pushes throughput from 2.9K to 60K writes/second on a single server. Kafka 4.1 enables Eligible Leader Replicas by default, closing a long-standing gap where committed messages could be lost even with acks=all. Postgres 19's autovacuum overhaul replaces catalog-order scheduling with a scored priority queue and adds parallel index vacuuming. Atlassian open-sourced AOSC, an OpenSearch plugin that cuts index migration write-block windows to 2-5 seconds.

## Content

**TLDR:** A batching fix to Postgres LISTEN/NOTIFY's global lock bottleneck pushes throughput from 2.9K to 60K writes/second on a single server. Kafka 4.1 enables Eligible Leader Replicas by default, closing a long-standing gap where committed messages could be lost even with acks=all. Postgres 19's autovacuum overhaul replaces catalog-order scheduling with a scored priority queue and adds parallel index vacuuming. Atlassian open-sourced AOSC, an OpenSearch plugin that cuts index migration write-block windows to 2-5 seconds.

---

## Postgres LISTEN/NOTIFY throughput jumps 20x with batched global lock

The global exclusive lock NOTIFY takes on every commit serializes all notifying transactions and kills group commit, capping throughput at roughly 2.9K writes/second. The fix buffers notifications in memory and flushes them in batches, so the lock is taken periodically rather than per-write. Result: 60K stream writes per second on a single Postgres instance with 15-100ms latency. A polling fallback handles notification loss on process crash, making this a viable alternative to dedicated message brokers for moderate fan-out workloads. [Read more](https://daily.dev/posts/WEhhiXOjN)

## Kafka 4.1 enables Eligible Leader Replicas by default via KIP-966

ELR fixes the 'Last Replica Standing' scenario where a replica outside the ISR could be elected leader and lose committed messages even when producers used acks=all. The new middle state tracks replicas that held data up to the frozen High Watermark as safe leader candidates when ISR drops below min.insync.replicas. One behavioral change to know: a degraded ISR now freezes consumer visibility, not just producer durability. ELR was experimental in Kafka 4.0 and is on by default in 4.1, KRaft only. [Read more](https://daily.dev/posts/0e0n2w9kY)

## Postgres 19 autovacuum gets priority scoring and parallel index workers

The current catalog-order scheduling means a bloated table can sit behind irrelevant ones in the maintenance queue. Postgres 19 replaces this with five component scores per table — XID age, multixact age, dead tuples, inserts, and analyze changes — with six new GUCs to weight them. A new pg_stat_autovacuum_scores view exposes live scores so you can actually see why a table is or isn't being vacuumed. A separate autovacuum_max_parallel_workers parameter lets a single worker recruit parallel helpers for index vacuuming, matching what manual VACUUM has had since Postgres 13. [Read more](https://daily.dev/posts/TWa0s3Fdk)

## Atlassian open-sources AOSC for zero-downtime OpenSearch index migration

OpenSearch's native split/shrink/reindex operations all require write-blocking the source index, which means stale search results during migration. AOSC runs inside the cluster using Retention Leases and Lucene Changes Snapshots for CDC-style replay, backfills from source, then applies a write block of roughly 2-5 seconds for a final replay before atomically swapping the alias. Adaptive batch controllers and concurrency limits prevent cluster overload under live traffic. The plugin handles custom routing keys and power-of-2 shard splits and is open-sourced under Atlassian Labs. [Read more](https://daily.dev/posts/oZ3AhPYbH)

---

## Also notable

- **PostgreSQL full_page_writes: leave it on, tune wal_compression instead:** Disabling full_page_writes is only defensible on storage guaranteeing atomic 8kB writes (e.g., ZFS with matching recordsize), and the failure mode is silent corruption discovered months later — wal_compression with lz4 or zstd is the correct lever for reducing WAL volume. [Read more](https://daily.dev/posts/IwrK5j2GZ)
- **Prisma shadow database resets and snake_case mapping are real operational costs:** Prisma's shadow database mechanism will silently reset development databases when the user lacks CREATE/DROP privileges on cloud-hosted instances — the fix is setting shadowDatabaseUrl explicitly to a disposable database, and Drizzle's built-in casing builder avoids the @map annotation overhead entirely. [Read more](https://daily.dev/feed-by-ids?id=Qvn0dWuxs&id=W5c3PtW7F)
- **Percona PBM 2.15.0 and PCSM 0.9.0 ship CycloneDX 1.6 SBOMs with every artifact:** Both tools now embed a Syft-generated SBOM in binary tarballs, RPM/DEB packages, and Docker images (two SBOMs per image: Go modules and full OS layer), scannable with Trivy or Grype to answer CVE exposure questions on day one of a release. [Read more](https://daily.dev/posts/PzDWnS2Zn)
- **Read-your-writes consistency failure: replica lag of 1.4 seconds caused users to lose their own comments:** Routing reads to an async replica with 1.4 seconds of lag meant freshly written comments were invisible to their authors, triggering duplicate posts — author-pinning reads to primary or session tokens are the standard fixes. [Read more](https://daily.dev/posts/4ilZ7cPdq)

## Similar posts on daily.dev

- [Postgres LISTEN/NOTIFY actually scales](https://daily.dev/posts/postgres-listen-notify-actually-scales-wehhixojn) · Hacker News · 34 upvotes · 2 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/postgres-listen-notify-hits-60k-writes-sec-kafka-4-1-ships-elr-by-default-n15iuomsf)

```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":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/postgres-listen-notify-hits-60k-writes-sec-kafka-4-1-ships-elr-by-default-n15iuomsf","headline":"Postgres LISTEN/NOTIFY hits 60K writes/sec, Kafka 4.1 ships ELR by default","text":"A batching fix to Postgres LISTEN/NOTIFY's global lock bottleneck pushes throughput from 2.9K to 60K writes/second on a single server. Kafka 4.1 enables Eligible Leader Replicas by default, closing a long-standing gap where committed messages could be lost even with acks=all. Postgres 19's autovacuum overhaul replaces catalog-order scheduling with a scored priority queue and adds parallel index vacuuming. Atlassian open-sourced AOSC, an OpenSearch plugin that cuts index migration write-block windows to 2-5 seconds.","url":"https://daily.dev/posts/postgres-listen-notify-hits-60k-writes-sec-kafka-4-1-ships-elr-by-default-n15iuomsf","datePublished":"2026-07-25T04:17:54.546Z","dateModified":"2026-09-13T21:15:49.418Z","author":{"@type":"Organization","name":"Databases Digest","logo":"https://media.daily.dev/image/upload/s--ir1hdV8b--/f_auto,q_auto/v1773839400/logos/databases_digest?_a=BAMAMiiu0","url":"https://daily.dev/sources/databases_digest"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/databases_digest","name":"Databases Digest"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Databases Digest","item":"https://daily.dev/sources/databases_digest"},{"@type":"ListItem","position":3,"name":"Postgres LISTEN/NOTIFY hits 60K writes/sec, Kafka 4.1 ships ELR by default"}]}
```

