---
title: "PostgreSQL 19 Beta 1 drops, Cloudflare patches ClickHouse mutex contention"
url: https://daily.dev/posts/postgresql-19-beta-1-drops-cloudflare-patches-clickhouse-mutex-contention-sbshompyw
source_url: https://daily.dev/posts/postgresql-19-beta-1-drops-cloudflare-patches-clickhouse-mutex-contention-sbshompyw
type: freeform
source: "Databases Digest"
published: 2026-06-07T04:18:21.910Z
updated: 2026-06-07T04:18:44.891Z
tags: ["backend", "postgresql", "sqlite", "clickhouse"]
reading_time: 3
upvotes: 0
comments: 0
language: 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.

# PostgreSQL 19 Beta 1 drops, Cloudflare patches ClickHouse mutex contention

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

## Summary

A curated digest covering several database topics: PostgreSQL 19 Beta 1 is released with async I/O auto-scaling, parallel autovacuum, 2x faster FK inserts, SQL/PGQ graph queries, and other changes including JIT disabled by default and lz4 as default TOAST compression. Cloudflare traced a 50% ClickHouse query slowdown to an exclusive mutex in the query planner, patched it with a shared lock, and the fix ships in ClickHouse 25.11. SQLite benchmarks show UUID4 primary keys are 14-16x slower than integer keys due to B-tree thrashing, while UUID7 (time-ordered) nearly matches integer performance. Also covered: IceStream's 4x speedup for Iceberg equality deletes using Paimon SSTable lookups, Redis MULTI/EXEC transaction internals with no rollback support, and PostgreSQL data_directory_mode permissions behavior.

## Content

**TLDR:** PostgreSQL 19 Beta 1 is out with a long feature list — async I/O auto-scaling, parallel autovacuum, 2x faster FK inserts, and SQL/PGQ graph queries among the highlights. Cloudflare traced a 50% query slowdown in ClickHouse to a single exclusive mutex in the query planner and patched it upstream; the fix lands in version 25.11. UUID4 primary keys in SQLite can hit 14-16x slower inserts than integer keys due to B-tree thrashing — UUID7 closes most of that gap. TypeORM 1.0 was covered in yesterday's digest, so no repeat here.

---

## PostgreSQL 19 Beta 1 released with async I/O, parallel autovacuum, and SQL/PGQ

PostgreSQL 19 Beta 1 is available now, with a final release expected around September/October 2026. The headline additions for backend engineers: async I/O worker auto-scaling, parallel autovacuum with a new scoring system, up to 2x faster inserts on tables with foreign key checks, and SQL/PGQ property graph query support. Also worth noting — JIT is disabled by default, lz4 replaces pglz as the default TOAST compression, and RADIUS authentication is removed. The new WAIT FOR LSN feature enables read-your-writes patterns on replicas without application-level workarounds. [Read more](https://app.daily.dev/posts/W9qMSgQlQ)

## Cloudflare patches ClickHouse exclusive mutex, cuts query duration 50%

Cloudflare's billing pipeline slowed after a per-tenant partitioning migration caused the number of data parts to balloon. Profiling showed 45% of CPU time stuck in a single function — filterPartsByPartition — waiting on an exclusive mutex in MergeTreeData. The fix replaced the exclusive lock with a shared lock, removed the per-query full parts list copy, and improved part filtering. After deploying in March 2026, query durations dropped 50% and performance stopped correlating with part count growth. The patch is upstream in ClickHouse 25.11. [Read more](https://app.daily.dev/posts/2YVQ0qcqd)

## UUID4 primary keys in SQLite are 14-16x slower than integer keys

Benchmarks across 100 million rows show that random UUID4s as primary keys in SQLite WITHOUT ROWID degrade insert throughput by 14-16x compared to integer rowid, because random B-tree insertions force constant rebalancing. UUID4 WITH ROWID is better but still slow due to random secondary index writes. UUID7 — time-ordered — performs nearly on par with integer keys. If you're using SQLite and need UUID primary keys, UUID7 is the practical answer. [Read more](https://app.daily.dev/posts/8U2vUGAe7)

---

## Also notable

- **IceStream benchmarks 4x speedup converting Iceberg equality deletes using Paimon SSTable lookups:** IceStream, a tool that converts Apache Iceberg equality delete files to positional deletes, achieves up to 4x speedup over naive hash joins for 1 million equality deletes against 550 million rows by using Apache Paimon's SSTable files on object storage for binary-search lookups instead of full linear scans. [Read more](https://app.daily.dev/posts/J9KTGmACM)
- **Redis MULTI/EXEC transactions: no rollback, per-client command queuing:** A detailed walkthrough of Redis transaction internals shows that MULTI/EXEC queues commands per client (keyed by file descriptor) and executes them sequentially in a single thread — with no rollback support if a command fails mid-transaction. [Read more](https://app.daily.dev/posts/ebcwksOhz)
- **PostgreSQL data_directory_mode GUC reports 0700 vs 0750 permissions for backup process access:** PostgreSQL's data_directory_mode is a read-only GUC added in PG11 that tells SQL clients whether the data directory is owner-only (0700) or group-readable (0750), which matters for backup tools like pg_basebackup running as non-superusers — changing it requires a full cluster shutdown and manual chmod. [Read more](https://app.daily.dev/posts/BopbeSyCd)

---

Tags: [#backend](https://daily.dev/tags/backend), [#postgresql](https://daily.dev/tags/postgresql), [#sqlite](https://daily.dev/tags/sqlite), [#clickhouse](https://daily.dev/tags/clickhouse)

[View this post on daily.dev](https://daily.dev/posts/postgresql-19-beta-1-drops-cloudflare-patches-clickhouse-mutex-contention-sbshompyw)
