a curated list of database news from authoritative sources

November 29, 2026

PostgreSQL torn-page detection and protection

My DBA career began with Oracle Database, where recovery is traditionally divided into two failure scenarios: instance failure and media failure.

  • Instance recovery (called restart recovery in the ARIES paper) assumes database files remain physically valid. A server, operating system, or database instance stops unexpectedly, leaving pages at different points in time. Transaction logs contain the information needed to restore consistency.
  • Media recovery assumes stored data is unusable: a datafile or block is lost or corrupted. Recovery requires another valid copy, usually from a backup, replica, or other redundant storage.

This distinction is fundamental and clearly defined in the ARIES paper. Instance recovery uses the current online files (nonvolatile database and log) that remain after a crash, while media recovery uses restored copies (image copy) when the original storage is damaged.

A torn page falls between these cases. The same failure that triggers crash recovery can also damage the persistent starting point that recovery expects to find. If power fails while an 8 KB page is being written, only part of the write may reach storage, leaving pieces of two versions.

WAL or redo may contain every intended change, but that may not be enough to rebuild the page. Recovery usually applies changes to a valid older page. With a torn page, that starting point may itself be damaged.

Oracle addresses a related issue, fractured blocks, during online backups: a backup tool may read different block sections at different times. The solution resembles the full page logging discussed here, but applies only to external-tool backups. It protects against fractured reads, not writes.

A partial write to an online Oracle data block is different. Oracle Database can detect physical corruption when the block is later read, using checksums, but does not routinely log full-page images to let instance recovery repair it.

The damaged block instead requires media recovery. Block media recovery, available only in Enterprise Edition, restores an individual corrupt block from a valid copy, backup, or standby, without restoring the whole datafile. Standard Edition must restore the entire datafile.

Oracle avoids continuously logging full block images to limit redo costs. It detects rare damage and restores blocks during media recovery, a reasonable trade-off given production databases should have backups or standby copies and run. However, even simple crashes may occasionally require media recovery.

PostgreSQL makes a different trade-off. It uses full-page images (FPIs) in crash recovery to protect against torn pages from partial writes. With full_page_writes enabled by default, the first WAL record modifying a page after a checkpoint normally includes the entire page. If a crash interrupts a data-page write, recovery can use that WAL image to continue.

full_page_writes turns certain crash-induced physical damage into a problem crash recovery can solve. Here, I'll explore them through lab experiments and answer three questions:

  • What does "protect" mean? It means recovery can restore a complete page from a full-page image (FPI) in WAL, overwriting any mix of old and new sectors left by an interrupted write. PostgreSQL does not scan pages for torn writes during recovery. Normally, a page’s first modification after a checkpoint generates an FPI, giving recovery a complete page before replaying later changes.

  • What failures are covered? Failures that interrupt a data-page write, such as an OS crash, power loss, or storage failure. A PostgreSQL process crash alone usually cannot tear an I/O operation already handed to the OS, which remains responsible for it. However, storage can tear a page after acknowledging the write. In that case, FPIs do not detect or repair the damage.

  • What if the WAL full-page image is torn? WAL records include integrity checks, so corruption is detected. If an incomplete record is simply the legitimate end of WAL after a crash, recovery stops there — the normal case. But a corrupt record mid-WAL looks identical: replay stops at the first invalid record, and the database starts at the last valid one, dropping any committed work beyond that point. The log shows the LSN where redo ended (redo done at ...), but not whether valid WAL existed past it.

FPIs have a high cost: they increase WAL volume, local disk I/O, archiving, replication bandwidth, and WAL retention for physical backups. PostgreSQL pays this cost to repair certain crash-induced damage from WAL instead of needing another copy of the damaged page.

In the lab, I'll deliberately tear a page and demonstrate variations with data checksums and full_page_writes enabled and disabled.

--no-data-checksums and full_page_writes=on

The first example creates a database without checksums, which is still common because they’re enabled by default only for databases created after PG18 (or, more precisely, databases in a cluster created after PG18). Enabling them after upgrading to PG18 requires a long maintenance window. It also enables full-page images, the recommended default.

podman run -d --replace --name PG19 -e POSTGRES_PASSWORD=x \
 -e POSTGRES_INITDB_ARGS="--no-data-checksums" \
 docker.io/library/postgres \
 -c full_page_writes=on

I'll install binutils to use Linux's strings command to inspect the file, and start psql:

podman exec -it PG19 bash -c 'apt update ; apt-get install -y binutils'

podman exec -it -e PGUSER=postgres PG19 psql -P pager=off

I create a table, insert fifty rows containing "Hello World!", and checkpoint to ensure the pages are written to disk:

drop table if exists corruptme
;
create table corruptme as 
 select generate_series(1,50), 'Hello World!' as value
;
checkpoint
;

I check the data file’s contents:

postgres=# select
 current_setting('data_directory')
 ||
 '/'
 ||
 pg_relation_filepath('corruptme'::regclass) as file
;
                    file
--------------------------------------------
 /var/lib/postgresql/19/docker/base/5/16390
(1 row)

postgres=# \gset

postgres=# \setenv file :file

postgres=# \! ls -l $file

-rw------- 1 postgres postgres 8192 Nov 28 23:29 /var/lib/postgresql/19/docker/base/5/16390

postgres=# \! strings $file | uniq -c

     50 Hello World!

postgres=#

The file contains fifty "Hello World!".

To simulate a partial write, I’ll make the modifications and checkpoint, then restore the state with only half a page written.

I update all rows, changing "Hello World!" to "Thanks world":

update corruptme set value = 'Thanks world'
;

I save the half-page and checkpoint states for later restoration:


-- copy the second half of the first page
\! dd if="$file" of="$file.tmp" bs=4096 skip=1 count=1

-- copy the control file with the current checkpoint
\! cp /var/lib/postgresql/19/docker/global/pg_control /tmp/pg_control.tmp

I checkpoint and evict the pages from the shared buffers:

checkpoint
;
create extension if not exists pg_buffercache
;
select * from pg_buffercache_evict_all()
;

At this point, the file contains the new version of each row, along with the dead tuple that has not yet been vacuumed:

\! strings $file | uniq -c

postgres=# \! strings $file | uniq -c

     50 Thanks world
     50 Hello World!

To create a torn page, I replace the page’s second half with its pre-update version:

-- overwrite the last part of the page from the previous version
\! dd if="$file.tmp" of="$file" bs=4096 seek=1 count=1 conv=notrunc

The file contains only fourteen "Thanks world" entries. The others were probably written for the second half, but that part was lost.

postgres=# \! strings $file | uniq -c

     14 Thanks world
     50 Hello World!

The result may surprise you. PostgreSQL neither detects nor repairs the corruption. It sees the fifty earlier “Hello World!” entries, fourteen "Thanks world” entries, and a partial "Tha” (which we didn't see with strings, since it shows only strings longer than 4 characters by default):

postgres=# select count(*), value from corruptme group by value
;

 count |    value
-------+--------------
     1 | Tha
    14 | Thanks world
    50 | Hello World!

(3 rows)

The block is corrupted, but without a checksum, PostgreSQL sees nothing wrong. An applicable clean full-page image remains in the WAL, but it wasn’t applied. The checkpoint completed before I corrupted the block, so recovery never started. Full-page logging repairs only torn pages caused by a crash that interrupts a write. If you care about your data, always enable checksums: undetected corruption can otherwise go unnoticed and produce incorrect results.

To simulate corruption occurring before the checkpoint completed—the partial-write scenario FPI protects against—I restore the control file from before the checkpoint and crash the instance:

\! cp /tmp/pg_control.tmp /var/lib/postgresql/19/docker/global/pg_control

\! pkill -9 postgres

The container restarted, and I lost the connection:

postgres=# select count(*), value from corruptme group by value;
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

The instance recovered, and psql reconnected, so I ran the query again:

postgres=# select count(*), value from corruptme group by value
;

 count |    value
-------+--------------
    50 | Thanks world

(1 row)

postgres=# \q

The state is clean, and the committed update is visible. A crash during checkpoint writing caused PostgreSQL to apply WAL, repair the torn page, and replay the update.

The recovery is visible from the logs (podman logs PG19):

2026-11-29 16:23:28.698 UTC [1] LOG:  io worker (PID 64) was terminated by signal 9: Killed
2026-11-29 16:23:28.698 UTC [1] LOG:  terminating any other active server processes
2026-11-29 16:23:28.698 UTC [1] LOG:  all server processes terminated; reinitializing
2026-11-29 16:23:28.732 UTC [249] LOG:  database system was interrupted; last known up at 2026-11-29 16:21:29 UTC
2026-11-29 16:23:29.041 UTC [249] LOG:  database system was not properly shut down; automatic recovery in progress
2026-11-29 16:23:29.047 UTC [249] LOG:  redo starts at 0/01516C10
2026-11-29 16:23:29.381 UTC [249] LOG:  invalid record length at 0/015D9DA8: expected at least 24, got 0
2026-11-29 16:23:29.381 UTC [249] LOG:  redo done at 0/015D9D70 system usage: CPU: user: 0.02 s, system: 0.30 s, elapsed: 0.33 s
2026-11-29 16:23:29.403 UTC [250] LOG:  checkpoint starting: end-of-recovery fast wait
2026-11-29 16:23:29.440 UTC [250] LOG:  checkpoint complete: end-of-recovery fast wait: wrote 101 buffers (0.6%), wrote 3 SLRU buffers; 0 WAL file(s) added, 0 removed, 0 recycled; write=0.014 s, sync=0.010 s, total=0.048 s; sync files=50, longest=0.002 s, average=0.001 s; distance=780 kB, estimate=780 kB; lsn=0/015D9DA8, redo lsn=0/015D9DA8
2026-11-29 16:23:29.453 UTC [1] LOG:  database system is ready to accept connections

Restoring an old control file works in this lab because the WAL records remain and the redo point is valid. This simulates a crash before the checkpoint record is written. In a real crash, the control file isn't rolled back—it simply isn't written. Because the WAL checkpoint record is incomplete, recovery starts from the redo point of the previous checkpoint.

Lesson learned: During crash recovery, a full-page image repairs a torn page by replacing it entirely. Recovery can then continue from a clean, complete page and reach the last committed state in the WAL.

Checksums and full_page_writes=on

If checksums were enabled when you created your database or turned them on later, this kind of corruption can be detected—even if it didn’t result from a crash. I ran the same test with checksums enabled, which is the default for new databases in the current version:

podman run -d --replace --name PG19 -e POSTGRES_PASSWORD=x \
 docker.io/library/postgres \
 -c full_page_writes=on

I've run the same commands, and the difference now is that the corruption is detected:

...

postgres=# \! strings $file | uniq -c

     50 Thanks world
     50 Hello World!

postgres=# \! dd if="$file.tmp" of="$file" bs=4096 seek=1 count=1 conv=notrunc

1+0 records in
1+0 records out
4096 bytes (4.1 kB, 4.0 KiB) copied, 0.000101 s, 40.6 MB/s

postgres=# \! strings $file | uniq -c

     14 Thanks world
     50 Hello World!

postgres=# select count(*), value from corruptme group by value
;

ERROR:  invalid page in block 0 of relation "base/5/16390"

Enabling checksums is strongly recommended because they can detect corruption even without a crash. Modern storage systems are increasingly complex, and no software is entirely bug-free. Checksums can detect corruption, but they can’t repair it. Repairing a corrupt block requires another copy: restoring a backup and replaying WAL, or fetching the block from a physical standby. Both are manual operations that involve downtime. There's no built-in equivalent of Oracle's block media recovery. As a last resort, setting zero_damaged_pages=on lets recovery continue by zeroing the corrupt page, but this causes data loss: the cluster comes up, while the page’s contents are silently lost.

When restoring a backup, a torn page inside the backup is not necessarily a problem. PostgreSQL forces full-page writes for the entire duration of an online backup (pg_backup_start/pg_backup_stop, pg_basebackup), even when full_page_writes=off, precisely because a file-level copy can read a page while it is being written. Replaying WAL from the backup's start point then repairs any such page — provided it was modified during the backup window, so an FPI exists for it.

The most dangerous case is a page that was already corrupt before the backup began and remained untouched, since no FPI covers it and the corruption may persist after the restore. However, most PostgreSQL backup tools verify checksums during backup:

postgres=# \! pg_basebackup  -zFtar -D  /var/backup

WARNING:  checksum verification failed in file "./base/5/16390", block 0: calculated 56B2 but expected 6A01
WARNING:  file "./base/5/16390" has a total of 1 checksum verification failure
WARNING:  1 total checksum verification failure
pg_basebackup: error: checksum error occurred

It's a WARNING: always look at backup warnings

full_page_writes=off

I hope you’re convinced that checksums and FPI are both needed to detect and repair torn pages. They’re complementary, not alternatives: checksums detect corruption during reads, while full_page_writes repair torn writes caused by crashes during recovery.

For a better understanding, here’s my lab’s latest test: disable FPI:

podman run -d --replace --name PG19 -e POSTGRES_PASSWORD=x \
 docker.io/library/postgres \
 -c full_page_writes=off

As checksums are enabled, the same scenario detected corruption:

...

postgres=# select count(*), value from corruptme group by value
;
ERROR:  invalid page in block 0 of relation "base/5/16384"

As before, I restore the pre-checkpoint control file to force recovery, as if the corruption had occurred during a crash:

postgres=# \! cp /tmp/pg_control.tmp /var/lib/postgresql/19/docker/global/pg_control

postgres=# \! pkill -9 postgres

The difference is that I'm disconnected and cannot reconnect:

podman exec -it -e PGUSER=postgres PG19 psql -P pager=off

Error: can only create exec sessions on running containers: container state improper

The container didn't restart because PostgreSQL didn't recover. Here is the log:

2026-11-29 00:22:36.013 UTC [62] LOG:  page verification failed, calculated checksum 47342 but expected 53001
2026-11-29 00:22:36.013 UTC [62] CONTEXT:  I/O worker executing I/O on behalf of process 222
2026-11-29 00:22:36.013 UTC [62] LOG:  invalid page in block 0 of relation "base/5/16384"
2026-11-29 00:22:36.013 UTC [62] CONTEXT:  I/O worker executing I/O on behalf of process 222
2026-11-29 00:22:36.013 UTC [222] ERROR:  invalid page in block 0 of relation "base/5/16384"
2026-11-29 00:22:36.013 UTC [222] STATEMENT:  select count(*), value from corruptme group by value
    ;
2026-11-29 00:22:48.268 UTC [1] LOG:  io worker (PID 62) was terminated by signal 9: Killed
2026-11-29 00:22:48.268 UTC [1] LOG:  terminating any other active server processes
2026-11-29 00:22:48.268 UTC [1] LOG:  all server processes terminated; reinitializing
2026-11-29 00:22:48.306 UTC [247] LOG:  database system was interrupted; last known up at 2026-11-29 00:20:49 UTC
2026-11-29 00:22:48.534 UTC [247] LOG:  database system was not properly shut down; automatic recovery in progress
2026-11-29 00:22:48.540 UTC [247] LOG:  redo starts at 0/017630A8
2026-11-29 00:22:48.544 UTC [247] LOG:  page verification failed, calculated checksum 47342 but expected 53001
2026-11-29 00:22:48.544 UTC [247] CONTEXT:  WAL redo at 0/0177C208 for Heap/HOT_UPDATE: old_xmax: 675, old_off: 1, old_infobits: [], flags: 0x20, new_xmax: 0, new_off: 51; blkref #0: rel 1663/5/16384, blk 0
2026-11-29 00:22:48.545 UTC [247] LOG:  invalid page in block 0 of relation "base/5/16384"
2026-11-29 00:22:48.545 UTC [247] CONTEXT:  WAL redo at 0/0177C208 for Heap/HOT_UPDATE: old_xmax: 675, old_off: 1, old_infobits: [], flags: 0x20, new_xmax: 0, new_off: 51; blkref #0: rel 1663/5/16384, blk 0
2026-11-29 00:22:48.545 UTC [247] FATAL:  invalid page in block 0 of relation "base/5/16384"
2026-11-29 00:22:48.545 UTC [247] CONTEXT:  WAL redo at 0/0177C208 for Heap/HOT_UPDATE: old_xmax: 675, old_off: 1, old_infobits: [], flags: 0x20, new_xmax: 0, new_off: 51; blkref #0: rel 1663/5/16384, blk 0
2026-11-29 00:22:48.556 UTC [1] LOG:  startup process (PID 247) exited with exit code 1
2026-11-29 00:22:48.556 UTC [1] LOG:  terminating any other active server processes
2026-11-29 00:22:48.557 UTC [1] LOG:  shutting down due to startup process failure
2026-11-29 00:22:48.564 UTC [1] LOG:  database system is shut down

A regular redo record — not a full image — must apply its change to the page as found on disk. Redo read the torn page, the checksum failed, and recovery aborted. This requires media recovery (a backup, a standby copy, or zero_damaged_pages accepting data loss), not crash recovery — even though a crash is what triggered recovery.

Trade-off: the cost of FPI

Write-ahead logging (WAL) supports crash recovery by replaying logged changes onto usable database pages. PostgreSQL’s full-page images can also replace torn or otherwise unusable on-disk pages during recovery. This sound design reflects the distinction made in the ARIES paper: crash recovery alone can restore the database after a crash, but it comes at a cost. No database implementation is inherently better; each involves trade-offs.

I've run the same scenario with EXPLAIN (ANALYZE, WAL) for the update. With FPI explicitly disabled (not the default, and not a recommendation unless your storage guarantees protection from torn pages), the UPDATE's WAL records are on average 80 bytes per update row:

postgres=#  explain (analyze, buffers, wal, IO, costs off)
            update corruptme
            set value = 'Thanks world'
;
                                QUERY PLAN
---------------------------------------------------------------------------
 Update on corruptme (actual time=0.209..0.212 rows=0.00 loops=1)
   Buffers: shared hit=101 dirtied=1
   WAL: records=51 bytes=4044
   ->  Seq Scan on corruptme (actual time=0.031..0.072 rows=50.00 loops=1)
         Prefetch: avg=1.00 max=1 capacity=94
         Buffers: shared hit=1 dirtied=1
         WAL: records=1 bytes=44
 Planning:
   Buffers: shared hit=9
 Planning Time: 0.405 ms
 Execution Time: 0.708 ms
(11 rows)

All 50 rows fit on one page, so only one buffer was dirtied (dirtied=1). This occurred during the Seq Scan, which generated one WAL record—likely a transaction- or visibility-related record—of bytes=44. The update logged 50 additional records, one per updated row, averaging 80 bytes each (new tuple data plus header metadata such as xmax, offsets, and flags).

With FPI enabled, more WAL bytes were generated, and the FPI part is detailed:


postgres=# explain (analyze, buffers, wal, IO, costs off)
           update corruptme set value = 'Thanks world'
;
                                QUERY PLAN
---------------------------------------------------------------------------
 Update on corruptme (actual time=0.180..0.182 rows=0.00 loops=1)
   Buffers: shared hit=101 dirtied=1
   WAL: records=51 fpi=1 bytes=6673 fpi bytes=2624
   ->  Seq Scan on corruptme (actual time=0.036..0.075 rows=50.00 loops=1)
         Prefetch: avg=1.00 max=1 capacity=94
         Buffers: shared hit=1 dirtied=1
         WAL: records=1 fpi=1 bytes=2673 fpi bytes=2624
 Planning:
   Buffers: shared hit=9
 Planning Time: 0.294 ms
 Execution Time: 0.536 ms
(11 rows)

Exactly one full-page image (fpi=1) was emitted for the first post-checkpoint record to touch the page- the WAL-logged Seq Scan modification. The total bytes=6673 is 2629 bytes more, roughly the FPI itself (fpi bytes=2624) plus record overhead. WAL compression is enabled by default, and my page of 50 near-identical short tuples and free space compresses well, making it smaller than the 8k page size.

Conclusion

Write-ahead logging (WAL) addresses a basic crash-recovery problem: memory is volatile, while storage is persistent. A crash can erase in-memory changes, and disk datafiles may contain pages from different points in time. WAL records changes before data pages are written, allowing recovery to replay missing changes. PostgreSQL checkpoints mark how far datafiles are known to be durable and where recovery should begin.

Ordinary WAL recovery assumes disk pages may be old but remain structurally valid. A torn write violates that assumption: a page can combine parts of different versions. Even if WAL contains every change, redo cannot proceed without a valid starting page.

PostgreSQL uses two complementary mechanisms:

  • Checksums detect damage. Without them, as the first experiment showed, PostgreSQL may read a torn page and interpret corrupted contents as data. Detection matters because replaying WAL against an unknown or malformed page is unsafe.
  • Full-page images (FPIs) repair damage. With full_page_writes enabled, the first WAL record modifying a page after a checkpoint normally includes its complete image. If recovery finds a page torn by an interrupted write, PostgreSQL can restore that image before applying later WAL records.

Checksums identify an untrustworthy page but cannot reconstruct it. An FPI supplies a complete page from which redo can continue. Together, they can keep a failure that might otherwise require media recovery within instance recovery.

The full_page_writes=off experiment shows the limit. WAL survived and contained the updates, but recovery found a corrupt data page. The checksum detected the damage, but ordinary redo could not repair it, so recovery stopped. A valid copy—from backup, standby, or another source—is then needed for media recovery. The crash caused the failure, but crash recovery alone could not fix it.

Database systems make different engineering choices. PostgreSQL stores repair information in WAL as FPIs. InnoDB (MySQL) first writes pages to a doublewrite buffer, then to their final datafile location. If the final write is interrupted, recovery uses the intact buffered page and applies redo. Both approaches ensure redo has a valid page, but place the protection differently.

What if WAL itself is torn?

This differs from a torn data page. WAL is a sequential stream, and its records include integrity information that detects corruption. However, WAL has no second full copy of each record like a data-page FPI. If recovery needs a genuinely corrupt record, it cannot reconstruct it from neighboring records. It needs another valid copy, such as an archive or another server.

WAL’s sequential order distinguishes it from random data-page corruption. A torn page may sit among valid newer pages and transactions, creating a gap ordinary redo cannot cross. WAL provides an ordered recovery frontier: recovery advances only through the valid log prefix. An incomplete record at the legitimate end marks where crash recovery stops.

The three questions have complementary answers:

  • What does full_page_writes protect? It gives recovery a complete page image instead of relying on redo against a potentially torn page.
  • Which failures does it cover? Torn data-page writes when recovery replays an applicable FPI. Checksums complement this by detecting corruption outside that recovery path.
  • What if the FPI in WAL is torn? Record integrity checks detect the corruption, but WAL contains no extra copy to reconstruct it.

WAL primarily protects against the loss of volatile state. Checksums prevent reliance on damaged persistent state, while FPIs restore a valid data-page state for WAL to operate on.

In short: WAL records what happened, checksums determine whether a page is trustworthy, and FPIs can restore a trustworthy page during recovery.

Beyond full page images (FPI)

Torn-write protection can move below PostgreSQL, eliminating the need to log full-page images when the storage stack provides another guarantee that an 8 KB page cannot be partially overwritten.

Some storage provides this guarantee directly. Azure Managed Disks, for example, support atomic aligned 8 KiB and 16 KiB writes on supported Linux/NVMe configurations: the entire block is persisted, or none of it is. However, the guarantee requires large atomic writes to reach the device through a supported direct-I/O path, whereas PostgreSQL normally uses buffered I/O.

ZFS achieves a similar goal differently, through copy-on-write. Modified blocks are written to new locations rather than overwriting the existing blocks in place. The previous version therefore remains available while the new version is being made durable. The important principle is the same: don't leave recovery with a page containing a mixture of two versions.

Azure HorizonDB takes this further by separating PostgreSQL compute from relation-page persistence. The writer makes transactions durable through a zone-resilient WAL service, while a shared-storage fleet of page servers maintains relation data and applies WAL independently of the compute nodes.

HorizonDB page servers don't update PostgreSQL pages in place. They persist data into immutable, append-only layer files rather than overwriting an existing 8 KB page. An interrupted write of a new layer cannot turn the previously valid PostgreSQL page into a half-old, half-new page. The previous version remains available, and the required page state can be reconstructed from stored versions and WAL.

This doesn't make integrity checking unnecessary. HorizonDB's storage architecture uses checksums and LSN/sequence validation, maintains redundant data and WAL copies, and has mechanisms to reconstruct data from an earlier consistent state and WAL.

The distinction is important: full_page_writes=off doesn't mean torn-write protection has been sacrificed. The responsibility has moved. HorizonDB offloads page persistence, torn-page protection, checkpointing, and dirty-page writing from PostgreSQL compute to its distributed storage architecture, allowing the compute nodes to run with full_page_writes=off.

That eases pressure on PostgreSQL’s write path: fewer WAL bytes from FPIs, no compute-side writes of checkpoint data pages, and less storage I/O competing with application workloads. The safety guarantee remains, but the scale-out storage architecture provides it instead of the PostgreSQL compute node, which can scale only vertically.

November 28, 2026

Cumulative Measurement Error

Imagine you wanted to lay out a series of forty-five degree angles in a zig-zag pattern, like so:

Ancient geometers constructed forms like this using compass and straightedge. Today we have tools that make it easier. You might use a tape measure to measure distances, carpenter’s square to obtain measurements along right angles, and string and stakes to mark points and straight lines between them. You’d likely start by laying out the horizontal baseline using string. Then, since these are forty-five degree angles, you know each is the hypotenuse of a right triangle with two equal sides. You can measure some distance (say three feet) along the baseline, use your square to obtain a right angle, then measure that same distance straight out. That gives you the first angled segment.

Now what?

Well you have a square handy, so you can turn ninety degrees to form the second segment. Then turn negative ninety degrees to form the third segment. Continue in this fashion until you’ve constructed all eighteen. You could also use your tape measure to check that each pair of neighboring parallel lines are actually parallel.

Of course, no measurement is perfect. The ground isn’t flat, your stakes bend a bit, there’s parallax error between your eye, ruler, and the lines, your tape measure is a little wobbly, there’s cosine error from the tape measure not being perfectly perpendicular, and so on. So the first line segment is a tiny bit off. If your measurement process is good to within one degree, it could be 44.2° rather than 45°.

Now from that 44.2°, you take a right angle. Maybe this time, you have an error of +1.3°. The resulting angle is 45.5°. That’s actually closer to 45°! Will the errors balance out over time, giving you approximately the right shape?

Unfortunately, no. When you add two uncorrelated measurements, their uncertainties add in quadrature. If each 90° turn introduces an error with standard deviation e = 1°, the standard deviation of the second error is √(e2 + e2) = 1.41°. The standard deviation of the third is √(e2 + e2 + e2) = 1.72°, and so on. By the time you’ve made seventeen right-angle turns, the standard deviation of the resulting angle is 4.12°, and your eyes start to notice.

Is this example pathological? To get a sense of the distribution, here’s fifty trials of that iterative measurement process, with each angle’s error uniformly distributed between +/- 0.9°. Now you can feel that the errors are likely to grow over time. This kind of cumulative error is why surveyors try to use as few stations as possible when laying out a traverse: each one introduces a little bit of error, and the more stations, the further off they’ll become. You’re making a copy of a copy of a copy—each one degrades a little bit.

This is actually the best case too: we’re assuming the errors are uncorrelated and have a mean of 0°. If there’s systemic error, the error compounds even faster. For instance, if you always stand on one side of the square, you might produce angles that are, on average, a little bigger than 90°, and before long you’d be way off.

What if instead of establishing one 45° angle and chaining all the rest off of it, you constructed a fresh 45° angle from the baseline every time?

These lines are drawn with the same, uniformly distributed +/- 0.9° angular error. But because each one starts from the known baseline, they stay within 0.9° of 45°, rather than drifting further and further from true. Here’s fifty trials of that procedure, so you can get a sense of the distribution:

Much better!

If you know errors compound, you might start to think about the chain of measurements that leads from the top-most constraints to any specific point. With the iterative procedure, in red, the right-most angle segment was eighteen steps away from the baseline. With the minimal procedure, in blue, every segment was only one step from the baseline. All else being equal, you want to try to minimize the length of those chains. Measurements should form a broadly branching tree, rather than a long, narrow one.1


  1. Really, a web: you want to cross-check measurements to estimate and control for error. For instance, if you’re measuring equal arcs along a circle, you want to perform a final measurement when closing the loop to identify the cumulative error, then distribute that error back to each arc.

    ↩

November 27, 2026

A Practical Guide to Adding and Updating MySQL Replication Filters

Managing MySQL replication filters in a live production environment doesn’t have to mean rebuilding your replicas from scratch. In this post, we’ll walk through how to safely exclude specific tables from replication and cleanly re-sync and add live tables back into the replication stream using mydumper and binlog coordinates, without ever touching the primary server. … Continued

The post A Practical Guide to Adding and Updating MySQL Replication Filters appeared first on Percona.

November 26, 2026

Grand Team Assemble: Percona Meet-up at Phuket

On November 19, half the planet was staring at a progress bar, waiting for 212 GB of Vice City to download. GTA VI went on to do $3.79 billion on day one. Biggest entertainment launch ever. A few weeks earlier, a different crew had already loaded into its own open world. No controllers. Just laptops, … Continued

The post Grand Team Assemble: Percona Meet-up at Phuket appeared first on Percona.

Can we save VLDB and SIGMOD?

I just bid on the 500+ submissions for this month's VLDB submission deadline. That's quite a number for a non-peak month. SIGMOD had about 2,000 submissions this year. Together, VLDB and SIGMOD will likely have over 5,000 submissions, all of which need to be reviewed.

I don't envy the PC chairs who have to heroically manage this flood. Program committee sizes are growing quickly, but everyone involved seems frustrated: reviewers are overloaded, authors get random reviews, and outcomes are becoming more and more random.

Maybe all this effort would be worth it if the estimated 1,000 accepted papers all contained great scientific breakthroughs. But instead, we get many superficially good-looking submissions with little novelty that are hard to read and review because AI currently writes well at the sentence level but not at the level of an entire paper.

The accelerating growth in paper submissions is driven by two multiplicative effects: (1) China's huge investment in science and (2) the use of AI in research, which makes it much easier to implement ideas, run experiments, and write papers. Given the current incentive structures in most of academia, it is only logical that submission numbers are increasing. I suspect that this trend will only accelerate as we learn to use agentic AI even better. And the more random the reviewing process becomes, the more rational it becomes to submit more papers. The kinds of institutional reforms currently discussed seem way too incremental and will not fundamentally change things.

Like many others, I tried out a number of different research ideas using agents over the past months, and for half a dozen of them, I got amazing results that I would have published in the past. Each typically took at most a couple of days of prompting for what would previously have been many months of work. AI also greatly accelerates the production of mediocre (but not very good) writing.

I think the only way forward is for the bar for publishing to go way up. The value of research in the real world is actually increasing, e.g., because good ideas can be integrated into systems much more quickly. Conversely, a lot of the incremental busywork that we are used to accepting at conferences because it took a lot of effort to implement and write up may actually have little or even negative value.

CedarDB 2026: Release Rewind

This post kicks off an end-of-year recap of the most impactful features we have shipped in CedarDB across our 2026 releases. Whether you have been following along closely or are just catching up, here are the additions we are most excited about.

zstd Compression

v2026-05-13, v2026-06-23, v2026-07-22

CedarDB has always stored cold data in a compact, analytics-optimized format. Every column gets a lightweight encoding, such as dictionary or frame-of-reference encoding, that shrinks the data and that queries can work on directly. Earlier this year we added ALP for floats and FSST for text to that toolbox. Now, CedarDB adds a second layer on top: cold data on disk is compressed with zstd by default.

While encoding and compression achieve the same thing, a reduction in on-disk size, they are two different tools. Encodings target a specific pattern in the and can allow efficient queries on the encoded data. General-purpose compression like zstd, on the other hand, finds redundancy that encodings leave on the table at the cost of needing to fully decompress the entire data for querying. We covered the trade-offs in detail in Encoding or Compression: Why not both?. The short version of that post is that CedarDB still keeps data encoded for processing and now additionally uses zstd to further reduce the size on disk.

On ClickBench’s hits table, zstd shrinks the encoded data from 21.4 GiB to 7.8 GiB, an additional almost 3x reduction on top of encoding. Best of all, zstd has no impact on the hot path. Once data is loaded into memory, it has the same encoded representation as without zstd, so queries on buffered data run exactly as fast as before. Decompression only happens when cold data is read from disk, and CedarDB applies zstd only where it actually pays off to do so on a fine-grained block level.

zstd is enabled by default for new tables. If you prefer to skip it, you can still turn it off per table:

CREATE TABLE events (id INT, kind TEXT, created_at TIMESTAMP) WITH (compression = none);

-- Switch an existing table back to zstd for newly written blocks
ALTER TABLE events SET (compression = zstd);

Changing the setting takes effect the next time data of that table is written to disk, so existing blocks stay as they are until they are rewritten.

To see how well your own tables compress, query the cedardb_compression_infos system view:

SELECT attributename, encoding, generalcompression,
 encoding_ratio, compression_ratio, total_ratio
FROM cedardb_compression_infos
WHERE tablename = 'hits';

Time-Series Helpers

v2026-05-13, v2026-09-16, v2026-10-08, v2026-10-22

CedarDB now supports three PostgreSQL functions for working with time series and messy imported data:

  • generate_series over numerics and timestamps, not just integers
  • make_interval(), which builds an interval from named parts
  • to_timestamp() / to_date() with format strings, which parse dates in any layout

Together they cover two common tasks: making a regular time grid so gaps in your data show up, and turning dates that aren’t ISO formatted into real date and timestamp values.

generate_series over numerics and timestamps

generate_series(start, stop, step) returns one row per step. Besides integers, it now accepts numeric bounds with a fractional step:

select * from generate_series(0.0, 1.0, 0.25);
-- 0.00, 0.25, 0.50, 0.75, 1.00

select * from generate_series(10.5, 9, -0.5);
-- 10.5, 10.0, 9.5, 9.0

It also accepts timestamps with an interval step:

select * from generate_series(timestamp '2026-11-01 00:00',
 timestamp '2026-11-01 03:00',
 interval '1 hour');
-- 2026-11-01 00:00:00, 01:00:00, 02:00:00, 03:00:00

Gotcha: Each step is added to the previous value, so month steps that start on the 31st get clamped and stay clamped: 2026-01-31, 02-28, 03-28, 04-28, …. PostgreSQL does the same. To get month ends, start on the 1st and subtract a day.

make_interval()

make_interval(years, months, weeks, days, hours, mins, secs) builds an interval from its parts. Every argument defaults to 0, so named arguments are the easiest way to call it:

select make_interval(hours => 36, mins => 15);
-- 36:15:00

select make_interval(years => 1, months => 2, weeks => 1); 
-- 1 year 2 mons 7 days

select make_interval(secs => 1.5); 
-- 00:00:01.5

select timestamp '2026-11-13 09:00' + make_interval(days => 3);
-- 2026-11-16 09:00:00

Its main advantage over interval string literals is with parameters. make_interval(mins => $1) takes a number straight from your application, so you don’t need to build '15 minutes' with string concatenation.

to_timestamp() / to_date() with format strings

to_date(text, format) and to_timestamp(text, format) parse a string using the same template patterns as to_char: DD, MM, YYYY, Mon, HH12, HH24, MI, SS, AM, TZH, and so on.

select to_date('13.11.2026', 'DD.MM.YYYY'); -- 2026-11-13
select to_date('Nov 13, 2026', 'Mon DD, YYYY'); -- 2026-11-13
select to_date('13-NOV-26', 'DD-MON-YY'); -- 2026-11-13
select to_timestamp('11/13/2026 4:05 PM', 'MM/DD/YYYY HH12:MI AM');
select to_timestamp('20261113-160512', 'YYYYMMDD-HH24MISS');
select to_timestamp('2026-11-13 16:05 +05', 'YYYY-MM-DD HH24:MI TZH');

to_timestamp returns a timestamptz. If the input has a zone offset (TZH, TZM), it is applied; otherwise the input is read in the session time zone. The parser follows PostgreSQL’s rules, including the less obvious ones. For example, two-digit years resolve to the year closest to 2020, and whitespace between numeric fields is tolerated.

Example: Filling gaps in an hourly series

Sensors don’t report every hour, and a plain GROUP BY date_trunc('hour', …) leaves out the hours with no readings. That’s misleading on a chart. To fix it, generate the full hourly grid and left-join the measurements onto it:

create table measurements (sensor_id int, measured_at timestamp, temperature numeric(5,2));
insert into measurements values
 (1, '2026-11-13 00:12', 4.10), (1, '2026-11-13 00:47', 4.30),
 (1, '2026-11-13 01:05', 3.90),
 (1, '2026-11-13 04:31', 2.80), (1, '2026-11-13 04:55', 2.60);

with hours as (
 select h
 from generate_series(timestamp '2026-11-13 00:00',
 timestamp '2026-11-13 05:00',
 make_interval(hours => 1)) as g(h)
)
select h as hour,
 count(m.temperature) as readings,
 round(avg(m.temperature), 2) as avg_temp
from hours
left join measurements m
 on m.measured_at >= h and m.measured_at < h + make_interval(hours => 1)
group by h
order by h;
hour readings avg_temp
2026-11-13 00:00:00 2 4.20
2026-11-13 01:00:00 1 3.90
2026-11-13 02:00:00 0 NULL
2026-11-13 03:00:00 0 NULL
2026-11-13 04:00:00 2 2.70
2026-11-13 05:00:00 0 NULL

The quiet hours now appear with readings = 0. To change the resolution, pass a different step, such as make_interval(mins => 15), or pass it as a query parameter.

Example: Parsing non-ISO dates from imported data

CSV exports from spreadsheets and ERP systems seldom use ISO dates. A common approach is to load the raw columns as text and convert them in SQL:

create table raw_orders (order_id int, order_date text, shipped text);
insert into raw_orders values
 (1001, '03.11.2026', '11/05/2026 2:30 PM'), -- German order date, US ship time
 (1002, '14.11.2026', '11/17/2026 9:05 AM'),
 (1003, '1.12.2026', '12/02/2026 11:45 AM');

select order_id,
 to_date(order_date, 'DD.MM.YYYY') as ordered,
 to_timestamp(shipped, 'MM/DD/YYYY HH12:MI AM') as shipped_at,
 to_timestamp(shipped, 'MM/DD/YYYY HH12:MI AM')::date
 - to_date(order_date, 'DD.MM.YYYY') as days_to_ship
from raw_orders
order by order_id;
order_id ordered shipped_at days_to_ship
1001 2026-11-03 2026-11-05 14:30:00+01 2
1002 2026-11-14 2026-11-17 09:05:00+01 3
1003 2026-12-01 2026-12-02 11:45:00+01 1

The format string removes the ambiguity: 03.11.2026 is March 11th to an American and November 3rd to a German, but DD.MM.YYYY reads it one way only. Unpadded values such as 1.12.2026 also parse. To keep the typed data, finish with create table orders as select …, or use the same expressions in an insert … select.

Range Types

v2026-05-18

Range types are a convenient way to define a range of values between two bounds. Instead of manually creating two columns and having to worry about NULL values, inclusiveness of bounds or getting queries on them right, CedarDB handles the whole interval in a single value with built-in operators.

Take a room booking system. Each booking is a single tstzrange:

CREATE TABLE bookings (
room INT,
guest TEXT,
stay TSTZRANGE
);

INSERT INTO bookings VALUES
(101, 'Ada', '[2026-12-20 15:00, 2026-12-23 11:00)'),
(101, 'Grace', '[2026-12-27 15:00, 2027-01-02 11:00)');

Two operators answer the common questions. Containment (@>) tells you who is in a room at a given moment. Overlap (&&) tells you whether a new request clashes with an existing booking:

  • Who is in room 101 on New Year’s Eve at midnight?
SELECT guest FROM bookings
WHERE room = 101 AND stay @> '2026-12-31 23:59:59+00'::timestamptz;
  • Is room 101 free from Dec 22 to Dec 28?
SELECT count(*) = 0 AS available FROM bookings
WHERE room = 101 AND stay && '[2026-12-22 15:00, 2026-12-28 11:00)';

See the range type documentation for more features, such as open-ended ranges or other operators and functions.


That’s it for now!

See you soon in the next edition of the release rewind. It’s going to cover improvements for DDL statements and configuration management.

Want to try out the new features right away? Head to CedarDB Cloud and run the queries on the shared demo project or your own trial instance, free of charge for 30 days.

Prefer working locally? Have a look at our installation guide.

Questions or feedback? Join us on Slack or reach out directly.

November 25, 2026

Village News: MySQL News + Events (25 November 2026)

Welcome back to Village News, our curated roundup of MySQL and database news. This week, Oracle's November CSPU brought 10 security fixes for MySQL, PostgreSQL 19 reached general availability, and MariaDB 13.1 went stable.

If you want to get these updates, just subscribe to the blog.

Enjoy!

Introducing Supabase Knowledge Base

Migration guides, troubleshooting, FAQs, tutorials, and community guides for applied Supabase answers, all in one place your coding agent can read.

November 24, 2026

Meaningful Human-in-the-Loop Checking of GenAI Synthesis for Restricted Languages

When the only comment on a PR is "LGTM", due diligence has not been done. A glance is not understanding. Understanding has levels, and we almost always overestimate ours. But the LGTM stamps the code as correct anyway. Make no mistake (pun intended), this is also true for LLM-generated code, even with so-called "correct-by-construction" approaches.

Why does verification catch anything at all? Because of redundancy. You write the specification carefully and then write the implementation separately, and the verification check finds the places where the two disagree.

LLM code synthesis throws that away. It derives the implementation from the specification, so the two can almost never disagree. Correct-by-construction becomes a dangerous misnomer. If the specification is wrong, the implementation is wrong in exactly the same way. Better models will not fix this. Any move from natural language to a specification leaves an intent gap between what the user meant and what the specification captures. The devil is in the cornercases.


We need to do better than LGTM.

This ECOOP 2026 paper is brought to you by Brown. To resolve ambiguity in LLM-generated specification snippets, the paper introduces PICK, a human-in-the-loop tool that eliminates mismatched candidate formulas by asking users to classify concrete distinguishing scenarios sampled from the candidates' semantic differences. PICK brings the redundancy back in verification checks. Your answers about concrete cases are a second statement of intent, made in a different form than the prose prompt.


The idea

PICK derives not one but four candidate expressions from the user's prose description. It computes where the candidates disagree, and samples concrete scenarios from those regions to show them to the user two at a time, in a this-or-that format. The scenarios they study in the paper are strings for regexes, traces for LTL, and requests for access-control policies. The target is restricted languages for now as the title says. The user accepts or rejects each scenario, and each vote is checked against every candidate. A candidate is eliminated after two downvotes and needs at least one upvote to be selected. This repeats until one or zero candidates remain.

Each classification is checked against every candidate, not just against the one the scenario came from. Accept a scenario and every candidate whose language contains it gets an upvote, while the ones that exclude it get a downvote. One answer updates several candidates at once, and this keeps the number of questions small.

Rejecting is deliberately asymmetric. If you reject a scenario, the candidates that accept it get downvoted, but the candidates that also reject it get nothing. Otherwise a candidate could win by outlasting the others rather than by being chosen. A candidate has to earn at least one upvote to get selected. Ending with zero candidates is a legitimate outcome. It means either the LLM produced nothing correct or the user's intent is inconsistent.

How restricted do these languages need to be? Not very. You need to compute the set difference between two candidates, which means closure under negation and intersection. You need to decide equality, so that candidates with identical meaning can be collapsed before you waste questions on them. And you need to sample concrete instances out of a difference set. Regexes qualify. LTL qualifies, and they use Spot to generate the traces. ABAC (attribute-based access control) qualifies once you bound the entities.

Notably  SQL does not as query containment is undecidable. The paper also gives a second reason: A query means nothing without a database, so the object the user has to judge is a query-and-database pair.


The experiments

The regex and ABAC studies had three groups of 50 participants each, recruited through the Prolific platform. Everyone got the same task: here are four candidate expressions, pick the right one. 

The groups differ only in what help they get. The control group saw the four candidates and picked one, with no examples. They could also say none was correct, or that they were unsure. The other two groups used PICK and classified scenarios instead of reading formulas. One of those two could see the candidate list while classifying and the other could not. This is how they test whether seeing the formulas helps at all, but this turned out to make no measurable difference.

Regex experiment: On abWords (a/b strings with b in every even position), control got 22% right, versus 60-72% with PICK. The most common wrong answer, chosen by 19 of 50, was ~((a|b)b)+~, which requires even length. On Dates, where no candidate was correct, control got 26% and PICK 66-70%. Of the 13 control participants who said they regularly write regexes, none got both abWords and Dates right.

ABAC experiment: Significant improvement on two of the three policies. PICK users were also 2-4 times more likely to eliminate every candidate, while control users tended to pick a wrong policy that was close to the correct one. I think this is the right behavior. A subtly wrong policy may go unnoticed for a long time, whereas an empty result tells you immediately that something needs fixing.

LTL: There was no new control group. The candidates were formulas that LTL-trained participants wrote in two earlier studies by the same group, and those participants' accuracy served as the baseline. PICK users were crowdworkers with no LTL background who never saw a formula. On RedOnce ("red is on in exactly one state"), they got 68% versus about 25%. Pooled across three problems, 56% versus about 44%.


Inverting PICK: a Paxos tutor

The PICK idea should also work for TLA+. You write a prose description, an LLM gives you several candidate specs, and PICK asks you about concrete behaviors until one survives. That would close the intent gap, but the hard part is the design, not the theory. The regex, LTL, and access-control scenarios are considered toy compared with a full TLA+ spec. How to apply PICK in a scalable and manageable wayto a TLA+ spec is an open question. What do we show, and at what level of abstraction? I have not attempted that, but instead I tried something simpler: a Paxos tutor built on the PICK idea.

PICK assumes the specification is unknown and the user is the oracle. We flip that around here. The Paxos specification is known, but in this case the user would need to be brought up to speed on it. Following this approach, I built an interactive Paxos tutor. Ok, Opus 5.5 built it, but I had to babysit it over at least ten rounds. It is hard to teach a machine empathy for the user. And it turns out, as I suspected, distributed algorithms are still very hard for an LLM to manage, even with TLC as a backend.

The app is called "Do you Paxos?" and it is available here. The candidates are correct Paxos plus eleven mutants, each one a misconception people hold. Questions come from the steps where correct Paxos and a mutant disagree. None of this is hand-written. The app runs its own Paxos state machine, and every question is generated from one of its reachable states, with the answer attached. A TLA+ spec of Paxos is checked against that state machine on every build, so the two cannot drift apart. 

Less WAL, More Transactions: PostgreSQL and HorizonDB in VS Code

The previous post in this 9-TiB TPC-C PostgreSQL series ended with a direction: keep commit durability, but move persistence work away from the PostgreSQL writer. Here I look at what that architecture looks like in the dashboard, with PostgreSQL and HorizonDB running side by side.

I use the Microsoft PostgreSQL extension for Visual Studio Code. Its Waits, Overview/Metrics, and Queries tabs put backend activity, PostgreSQL counters, and statement statistics next to each other. The interesting part is not just which system completes more transactions. It is what the backends are doing while those transactions execute.

The comparison behind the screenshots

This November 9 measurement reused the two 95,000-warehouse databases, approximately 9 TiB each. Both ran public HammerDB 6.1.1 with the standard, nonpartitioned workload: 512 active workload users, a 15-minute ramp-up, and a 45-minute measurement.

Configuration PostgreSQL/Patroni HorizonDB
Writer compute E64bds_v5, 64 vCPUs / 512 GiB Intel Gen1, 64 vCores
Data storage 20-TiB Ultra SSD, NVMe Disaggregated, shared storage
Shared buffers 128 GiB (leaving room for OS buffers) Approximately 362.83 GiB
Workload synchronous_commit local with no HA on for multi-zone HA

The Ultra SSD was provisioned for 294,800 IOPS and 7,800 MB/s, with data and WAL on the same device to be sure not to be limited by the Premium SSD read ceiling I observed in the first run.

On PostgreSQL, synchronous_commit=local means that commit waits for the primary's WAL to become durable, but not for a standby acknowledgement. Replication remains enabled, asynchronously with respect to the commit response. Automatic Patroni failover was paused for this measurement. I'm deliberately comparing RPO>0 PostgreSQL on zone failure vs RPO=0 HorizonDB to focus on performance without high availability concerns.

In the paired screenshots, PostgreSQL/Patroni is on the left and HorizonDB on the right. The dashboard history includes ramp-up and some time outside the measurement. The HammerDB results below cover the 45-minute measurement.

More transactions with the same number of workers

The transaction and tuple graphs show a much higher level of activity on HorizonDB. Look at the axes as well as the lines: the panels use different vertical scales.

The completed HammerDB runs report:

Measured throughput PostgreSQL/Patroni HorizonDB
New Orders Per Minute (NOPM) 47,651 436,132
PostgreSQL Transactions Per Minute (TPM) 110,037 1,003,592

That is 9.15x the NOPM in this pair of runs. NOPM is the workload's completed new-order rate. PostgreSQL TPM comes from database transaction counters. The dashboard's System - 10s transaction chart at the top left displays activity per collection interval, not the final HammerDB NOPM result.

With the same 512 workload users, the higher throughput means that those workers get through more work rather than spending as much time queued behind shared resources. The Waits tab shows where that difference becomes visible.

PostgreSQL queues behind WAL writes

The left wait stack is dominated by PostgreSQL lightweight locks. On the right, the largest band is an extension wait associated with HorizonDB storage reads.

These are selected rows from the displayed ranking:

Wait event PostgreSQL/Patroni HorizonDB
LWLock:WALWrite 80.4% 14.9%
LWLock:BufferContent 10.0% 0.5%
IO:DataFileFlush 4.4% N/A
IO:DataFileRead 3.2% N/A
Extension:HorizonDB_Storage_Read N/A 63.3%
LWLock:WALInsert 0.2% 9.8%

The percentages are shares of sampled backend observations in that dashboard history, not a transaction-latency breakdown. Its CPU category likewise is not host CPU utilization.

LWLock:WALWrite is a lock wait, not a direct measurement of disk-write duration. PostgreSQL serializes WAL writing and synchronization through this lock. While one backend performs that work, many other backends can wait for the lock before checking whether their own WAL position is already durable. Group commit lets a flush cover several transactions, but the waiting sessions still depend on that flush completing.

This explains why a slow WAL synchronization path can appear as hundreds of lock waiters rather than hundreds of sessions directly reporting an I/O wait. The separate 10-second capture inside the measured windows found an average of 426 active client backends at WALWrite on PostgreSQL, versus 79 on HorizonDB.

The WAL counters also report an average synchronization time of 29.79 ms per sync on PostgreSQL, versus 2.10 ms on HorizonDB. These are means of the reported WAL synchronization operations, not transaction commit latencies. They describe different persistence paths: a native local WAL flush on one side and the service's WAL durability path on the other.

Removing standby acknowledgement waiting therefore did not remove PostgreSQL's main queue. The primary still had to persist WAL locally.

Why the faster system still shows storage-read waits

HorizonDB_Storage_Read is the leading visible wait on the faster system. That identifies a page-request path and does not, by itself, identify an exhausted disk IOPS budget.

The HorizonDB storage architecture separates WAL servers from page servers. WAL servers specialize in low-latency log operations. Data pages are sharded across page servers, and a filtering service sends each shard the WAL relevant to its pages. Storage capacity and servicing work are not concentrated behind the writer's one attached data disk.

This is scale-out storage underneath one writer, not distributing these write transactions across multiple nodes. Requests still have latency, and a backend waiting for a page response exposes that latency as an extension wait. Once the large WAL queue is reduced, the read path occupies a larger share of the remaining observations. A leading read wait can coexist with much higher throughput.

On native PostgreSQL, DataFileRead is only 3.2% of the displayed observations. Together with the provisioned Ultra SSD budget, that shows why this comparison is no longer primarily about the original read-device ceiling. Reads remain work to do, but WAL serialization dominates this native run. Asynchronous replica acknowledgement also removes the standby wait from its commit path.

More WAL records, fewer WAL bytes

The next screenshot contains a useful apparent contradiction: HorizonDB produces many more WAL records, but fewer WAL bytes.

The bottom row is the important one here. WAL Bytes Written represents generated WAL bytes per collection interval, not physical disk bandwidth.

Counter differences over approximately 2,693 seconds inside each measured window give:

WAL metric PostgreSQL/Patroni HorizonDB
Generated WAL 327.22 GiB 173.69 GiB
WAL generation rate 124.42 MiB/s 66.04 MiB/s
WAL records 193,342,220 1,605,838,664
Full-page images 80,977,418 9,714,339
Mean bytes per WAL record 1,817 116

HorizonDB generates approximately 8.3 times as many records while producing about half the bytes. Dividing the generation rates by the reported PostgreSQL TPM gives an approximate 69.47 KiB versus 4.04 KiB of WAL per reported transaction, about 17.2x less on HorizonDB. That normalization includes background WAL and uses the nearby counter interval, so it is a workload-level indicator.

Why torn-page protection changes WAL volume

A PostgreSQL data page is normally 8 KiB. Writing it is not necessarily one crash-atomic operation through the filesystem and storage stack. A crash during a write can leave a mixture of old and new page contents: a torn page.

Normal WAL records describe changes to a page. Recovery needs a valid page on which to apply those changes. To protect against a torn page, PostgreSQL normally includes a full-page image on the first modification of that page after a checkpoint. WAL containing the recovery information must be durable before the data page is written. The PostgreSQL full-page-writes explanation describes this ordering.

On a large, write-heavy database, touching many different pages after checkpoints adds substantial image traffic to the log. Compression reduces the image bytes, but it does not remove the need to generate and process that protection.

The captured settings were:

Setting PostgreSQL/Patroni HorizonDB
full_page_writes on off
wal_compression zstd lz4

HorizonDB can move that responsibility because its page servers protect against torn pages. As described in the storage design, compute persists changes through WAL and the storage layer reconstructs and persists data pages. PostgreSQL compute does not have to log the usual full-page images to protect its own durable data-file overwrites.

The protection has moved into storage, not been discarded. An Ultra SSD upgrade alone does not make that architectural change, and turning off full_page_writes on conventional storage is not the equivalent.

The HorizonDB image counter is still nonzero: full_page_writes=off does not prohibit every operation from emitting a page image. Also, wal_fpi counts images, not their compressed bytes. What the measurements show directly is much lower image frequency relative to WAL records and much lower WAL volume for the transactional work performed.

That reduces the amount of data entering the WAL persistence path. Combined with a purpose-built WAL service, it explains the direction of the throughput difference much better than the phrase "faster disks."

Checkpoint counters do not mean the same physical I/O

The same screenshot shows checkpoint activity on both systems. The retained measured-window counters report 3 requested checkpoints on PostgreSQL and 16 on HorizonDB, and 3,420,969 versus 150,107,572 checkpointer buffers written.

Those larger HorizonDB buffer counters do not contradict offloaded persistence. The dashboard exposes PostgreSQL engine activity, while the service changes how durable page storage is implemented. They cannot be converted into an equivalent number of physical writes to a compute-attached SSD.

In native PostgreSQL, the checkpointer and background writer write durable relation pages through the primary's filesystem and storage path. In HorizonDB, durable data-page writing and recovery belong to the page servers. Checkpoint-related coordination and buffer activity can remain visible on compute without recreating the native data-file persistence path.

Cache hits are another part of the picture

The top row shows cache-hit ratios high on both sides, with more buffer activity on HorizonDB. The shared-buffer configurations are different: 128 GiB versus approximately 362.83 GiB.

HorizonDB also has a compute-local NVMe SSD cache, adding another tier before remote page storage. PostgreSQL's buffer-cache-hit graph is not a measurement of that SSD cache's hit rate. A page absent from shared buffers is not automatically a remote storage read, and a small SSD-cache wait share does not count how many quick cache hits occurred.

The read-side explanation therefore includes both a different cache hierarchy and a distributed page-serving layer. It is not simply that the two systems read the same pages from different SSD models.

Higher throughput is not a uniform query-latency multiplier

The Queries tab gives another view of the workload. These snapshots were taken around 18:30-18:31 CET, before the final throughput result.
PostgreSQL:

HorizonDB:

Selected displayed means are:

Statement label PostgreSQL/Patroni HorizonDB
neword 91 ms 31 ms
payment 8 ms 5 ms
slev 165 ms 143 ms
delivery 63 ms 68 ms
ostat 2 ms 3 ms

New-order execution has a substantially lower displayed mean, as does payment. Delivery and order-status do not. These are statement-entry means from the displayed statistics history, with all databases and users selected, rather than the final HammerDB measurement.

The prepare neword ... labels identify pg_stat_statements entries. They do not mean that the displayed duration is merely SQL preparation overhead. Total statement time sums concurrent execution: HorizonDB can show more total hours while also showing a lower mean and many more calls.

This is why I read throughput, waits, WAL, and query statistics together. Higher system throughput does not require every statement to be faster by the same factor. Reducing a heavily shared persistence queue changes how much work the whole workload can complete.

The architectural difference is visible

The earlier posts followed successive limits: data reads, WAL synchronization, and shared-buffer contention. This comparison returns to locally durable commits on native PostgreSQL, with Ultra SSD storage and no standby acknowledgement wait, and observes the two systems together.

The dashboard tells a consistent story:

  • PostgreSQL still concentrates sessions behind WALWrite, even after the read-storage upgrade and removal of replica acknowledgement waiting.
  • HorizonDB generates much less WAL for much more transactional work, consistent with moving torn-page protection out of PostgreSQL's normal full-page logging.
  • The visible wait mix shifts toward page requests and remaining WAL coordination, supported by a larger buffer cache, an SSD cache, and scale-out page storage.
  • Checkpoint activity remains visible, but durable data-page persistence is no longer the writer's native filesystem work.

HorizonDB keeps WAL as the durable record of changes, while dedicated storage services handle log durability, replication, and page materialization. The writer does less persistence work, and less image-associated WAL enters its critical path.

The 9.15x NOPM is the measured outcome of this pair. The screenshots make the architectural explanation concrete: not just more IOPS, but less work concentrated on the PostgreSQL writer.

Percona Database Service Is Now Open Source

We have some exciting news to share: Percona Database Service (PDS) is now open source! The source code is available on GitHub under the Apache 2.0 license, and we’ve also launched a redesigned PDS website to make it easier to explore and get started. When we first introduced PDS, our goal was simple: make deploying … Continued

The post Percona Database Service Is Now Open Source appeared first on Percona.

Oracle’s November CSPU and Percona for MySQL

Oracle published its November 2026 CSPU (Critical Security Patch Update) on November 17, with 10 new security patches for MySQL. Three of them can be exploited over the network without authentication. Percona tracks every Oracle security release, and we’re already working on this one. Oracle published the MySQL 8.4 source code for these fixes on … Continued

The post Oracle’s November CSPU and Percona for MySQL appeared first on Percona.

Pre-Calculating HugePages for PostgreSQL

Pre-Calculating HugePages for PostgreSQL Huge pages (HugeTLB) are one of the most important PostgreSQL tuning steps, and they must be right before the server starts. They matter mainly for stability and reliability, more than for speed. Recently I also came across reports of up to 30% performance gain as an added benefit, but only for … Continued

The post Pre-Calculating HugePages for PostgreSQL appeared first on Percona.

November 23, 2026

Putting Sixta to the Test: AI-Assisted MySQL Troubleshooting with PMM

Sixta is an AI agent that investigates database problems the way a DBA would. We wanted to evaluate how effectively it could diagnose MySQL problems using only the monitoring data already available in Percona Monitoring and Management (PMM). To test this, we set up a Percona Server for MySQL 8.0 primary-replica environment monitored by PMM. … Continued

The post Putting Sixta to the Test: AI-Assisted MySQL Troubleshooting with PMM appeared first on Percona.

How to Monitor Readyset with Percona Monitoring and Management

In a previous blog post, I showed how to add external exporters to Percona Monitoring and Management (PMM) and monitor Valkey/Redis. This time, let’s do the same with Readyset. Readyset is a caching layer that sits between your application and your MySQL or PostgreSQL database. It is wire-compatible with the database, so your application connects … Continued

The post How to Monitor Readyset with Percona Monitoring and Management appeared first on Percona.