Zhang Chen

Zhang Chen

PostgreSQL ACE & PostgreSQL Recovery Specialist

Creator of PDU (PostgreSQL Data Unloader) • Passionate about data recovery solutions and database reliability

Latest Posts

Thoughts, stories, and ideas

PostgreSQLKernel InternalsWALFPW
2026-03-0511 min-

Inside the Kernel: The Complete Path to PostgreSQL Delete Recovery — From FPW to Data Resurrection

In PostgreSQL, a DELETE operation does not immediately erase data from disk. The MVCC mechanism retains deleted rows as dead tuples, and reading these dead tuples is one viable approach to data recovery. However, this approach has a clear time limitation: once autovacuum completes its cleanup, the dead tuples are physically removed, and recovery methods based on data files become ineffective. At this point, the WAL (Write-Ahead Log) offers an alternative recovery path. Specifically, the **FPW (Full Page Write)** mechanism within WAL is the foundation of this approach. PostgreSQL DELETE recovery tools — including [PDU (PostgreSQL Data Unloader)](https://github.com/wublabdubdub/PDU-PostgreSQLDataUnloader) — rely on this technique. Its key property: **as long as the WAL files generated during the deletion period still exist, the data can be fully recovered regardless of how much time has passed.** This article dissects that recovery path function by function, based on **PostgreSQL 18** source code.

Read More
Unconventional RecoveryData DictionaryData RecoveryInstant Recovery
2026-01-095 min-

How to Turn PostgreSQL Unconventional Recovery into an Engineering Practice

When the database cannot start and no backup is available, many teams assume recovery is over. In many cases the data is still on disk, but the data dictionary is no longer usable. This article examines core challenges in unconventional recovery: rebuilding table structures from damaged dictionaries, handling dropped columns and TOAST tables, continuing under imperfect conditions, and why recovery speed is itself part of the capability.

Read More
Instant RecoveryBackupDatabase InternalsDisaster Recovery
2026-01-097 min-

Not a Backup Replacement: What PostgreSQL Instant Recovery Actually Solves

When people first hear about instant recovery, they often assume it is a replacement for backup—or worse, a risky shortcut only experts should attempt. But the truth is exactly the opposite. Instant recovery does not challenge any design boundary of PostgreSQL. It simply rejects a premise the kernel never promised - that the database must be in a bootable state. This article explains, from the perspective of PostgreSQL internals, why instant recovery is a capability that was always meant to exist, how it differs fundamentally from backup recovery, and why time itself is often the scarcest resource at an incident scene.

Read More