<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/pg18-predicate-locks-fail-75-of-the-time-by-default-nvme-changes-the-postgres-clickhouse-split-odgvy1vmf" -->

---
title: PG18 predicate locks fail 75% of the time by default,...
description: Today's biggest story is a benchmark showing PostgreSQL's serializable transaction defaults are actively hostile to real workloads. Elsewhere, local NVMe...
canonical: https://daily.dev/posts/pg18-predicate-locks-fail-75-of-the-time-by-default-nvme-changes-the-postgres-clickhouse-split-odgvy1vmf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: PG18 predicate locks fail 75% of the time by default, NVMe changes the Postgres/ClickHouse split | daily.dev
og:description: Today's biggest story is a benchmark showing PostgreSQL's serializable transaction defaults are actively hostile to real workloads. Elsewhere, local NVMe...
og:url: https://daily.dev/posts/pg18-predicate-locks-fail-75-of-the-time-by-default-nvme-changes-the-postgres-clickhouse-split-odgvy1vmf
og:image: https://api.daily.dev/og/posts/oDGvY1vmF.png
og:image:alt: PG18 predicate locks fail 75% of the time by default, NVMe changes the Postgres/ClickHouse split
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.

# PG18 predicate locks fail 75% of the time by default, NVMe changes the Postgres/ClickHouse split

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

## Summary

Today's biggest story is a benchmark showing PostgreSQL's serializable transaction defaults are actively hostile to real workloads. Elsewhere, local NVMe storage is reshaping how people think about pairing Postgres with ClickHouse for analytics, Uber shared how it rebuilt M3DB's sharding to cap blast radius from node failures, and a NOLOCK myth in SQL Server got debunked with hard numbers. A few smaller Postgres GUC and tooling stories round things out.

## Content

**TLDR:** Today's biggest story is a benchmark showing PostgreSQL's serializable transaction defaults are actively hostile to real workloads. Elsewhere, local NVMe storage is reshaping how people think about pairing Postgres with ClickHouse for analytics, Uber shared how it rebuilt M3DB's sharding to cap blast radius from node failures, and a NOLOCK myth in SQL Server got debunked with hard numbers. A few smaller Postgres GUC and tooling stories round things out.

---

## PostgreSQL's default predicate lock limits cause a 75.6% serialization failure rate

A benchmark on PostgreSQL 18.6 found that the conservative defaults for max_pred_locks_per_page and max_pred_locks_per_relation (2 and -2) push serializable transactions to fail 75.6% of the time under realistic load, because tuple-level locks get force-downgraded to page and then relation level far too aggressively. Raising max_pred_locks_per_relation to 1000 dropped that failure rate to 0.08%. The catch: the shared memory predicate lock table only has 8,704 entries, so cranking the limit without also setting idle_in_transaction_session_timeout risks exhausting it if long-running idle transactions hang onto locks. [Read more](https://daily.dev/posts/UOOTpcHvQ)

## NVMe closes the Postgres/EBS latency gap, but row-store limits still push analytics to ClickHouse

Benchmarks at 3.3 billion rows and 482 GiB show local NVMe delivering 9.2x more throughput and roughly 9x lower per-update latency than network-attached gp3 EBS, mainly by shrinking cache-miss latency from milliseconds to microseconds. Durability concerns get solved the usual way: quorum sync replication across AZs via Patroni or repmgr, plus continuous WAL archival to S3 via WAL-G. The catch is that faster storage doesn't change Postgres's row-store layout, so the recommended setup still streams changes into ClickHouse via CDC for any workload scanning billions of rows. [Read more](https://daily.dev/posts/m0Kvgk6yb)

## Uber rebuilds M3DB shard placement so one node failure can't touch two-thirds of the cluster

Under M3DB's original permissive placement model, a single node failure could affect up to (n-1)/n of the cluster, and Uber saw cases where a node shared data with up to 66.67% of all other nodes. The fix partitions nodes into fixed-size subclusters that each own a nonoverlapping slice of the shard space, bounding failure impact to within a subcluster while still enforcing rack/zone replica isolation. Scaling uses a greedy shard-removal algorithm to rebalance without a separate pass, though it comes with real constraints: equal instance weights only, scaling in multiples of subcluster size, and no replica factor changes mid-subclustering. [Read more](https://daily.dev/posts/4hXeSOgyl)

## NOLOCK reads can double-count rows, not just miss them

A test against a 100,000-row table on SQL Server 2025 CU8 found 3 of 413 NOLOCK reads returned inflated counts, and every inflated read contained duplicate employee IDs rather than genuinely new rows, concentrated during heavy page-splitting. It's a good reminder that NOLOCK's dirty-read tradeoff cuts both ways. If you need an actual count, the alternatives are sys.dm_db_partition_stats for an approximation, snapshot isolation for a consistent point-in-time read, or just fixing the blocking that made you reach for NOLOCK in the first place. [Read more](https://daily.dev/posts/LUwuPNpIZ)

---

## Also notable

- **Percona Server for MySQL 9.7.2 adds a DISTANCE() vector similarity function:** It supports COSINE, EUCLIDEAN, EUCLIDEAN_SQUARED, MANHATTAN, and DOT metrics on any platform running Percona Server, unlike MySQL's native equivalent which is locked to HeatWave on OCI and limited to three metrics, though without an ANN index it's still a full O(n) table scan. [Read more](https://daily.dev/posts/9DeNGns2U)
- **max_parallel_apply_workers_per_subscription defaults to 2 and silently spills to disk when exhausted:** Measured testing across PostgreSQL 18.6 and 19 beta 3 showed commit visibility lag jumping from 0.2s to 3.2-4.0s depending on whether parallel apply is available, and setting the value to 0 can be used as an emergency workaround for stuck skip conflicts. [Read more](https://daily.dev/posts/FZAyy8qkV)
- **Difflock 1.0.0 lints Laravel migrations against the live schema before they run:** The new package flags non-null column additions on populated tables and destructive drops, ships a migrate guard command plus CI exit codes, and requires PHP 8.3 with Laravel 12 or 13 across MySQL, MariaDB, PostgreSQL, and SQLite. [Read more](https://daily.dev/posts/lAeif7wFj)
- **DataVue cut monthly phonetic-match key generation runtime roughly in half with SingleStore Python UDFs:** Consolidating a duplicated Soundex-style matching algorithm (previously living separately in SQL and an external Python pipeline) into a single Python UDF running on autoscaled containers also let DataVue keep regulated data on-platform instead of standing up a separate processing service. [Read more](https://daily.dev/posts/Pix3lmGYR)

## Similar posts on daily.dev

- [All Your GUCs in a Row: max\_pred\_locks\_per\_page and max\_pred\_locks\_per\_relation](https://daily.dev/posts/all-your-gucs-in-a-row-max-pred-locks-per-page-and-max-pred-locks-per-relation-uootpchvq) · Planet PostgreSQL · 0 upvotes · 0 comments
- [Postgres on NVMe: performance and the convergence of transactions and analytics](https://daily.dev/posts/postgres-on-nvme-performance-and-the-convergence-of-transactions-and-analytics-m0kvgk6yb) · ClickHouse · 5 upvotes · 1 comments

---

Tags: [#database](https://daily.dev/tags/database), [#postgresql](https://daily.dev/tags/postgresql), [#distributed-systems](https://daily.dev/tags/distributed-systems), [#microsoft-sql-server](https://daily.dev/tags/microsoft-sql-server), [#clickhouse](https://daily.dev/tags/clickhouse)

[View this post on daily.dev](https://daily.dev/posts/pg18-predicate-locks-fail-75-of-the-time-by-default-nvme-changes-the-postgres-clickhouse-split-odgvy1vmf)

```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/pg18-predicate-locks-fail-75-of-the-time-by-default-nvme-changes-the-postgres-clickhouse-split-odgvy1vmf","headline":"PG18 predicate locks fail 75% of the time by default, NVMe changes the Postgres/ClickHouse split","text":"Today's biggest story is a benchmark showing PostgreSQL's serializable transaction defaults are actively hostile to real workloads. Elsewhere, local NVMe storage is reshaping how people think about pairing Postgres with ClickHouse for analytics, Uber shared how it rebuilt M3DB's sharding to cap blast radius from node failures, and a NOLOCK myth in SQL Server got debunked with hard numbers. A few smaller Postgres GUC and tooling stories round things out.","url":"https://daily.dev/posts/pg18-predicate-locks-fail-75-of-the-time-by-default-nvme-changes-the-postgres-clickhouse-split-odgvy1vmf","datePublished":"2026-09-22T04:19:05.420Z","dateModified":"2026-09-22T04:19:26.848Z","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":2},{"@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":"PG18 predicate locks fail 75% of the time by default, NVMe changes the Postgres/ClickHouse split"}]}
```

