PDU helps recover offline PostgreSQL databases by reconstructing metadata, exporting tables, and reading WAL for targeted row recovery.
When a PostgreSQL instance cannot be started, normal SQL tools are no longer available. PDU, PostgreSQL Data Unloader, is an open source recovery tool for that situation. It reads PostgreSQL data files and WAL archives directly, without modifying the original data directory.
PDU can reconstruct database, schema, and table metadata while the database is offline. After the structure is discovered, it can export a single table, a schema, or a full database with one command. The output is CSV, which makes it practical to inspect recovered data or load it into another PostgreSQL instance.
For accidental DELETE and UPDATE operations, PDU can also recover selected row data from WAL. This recovery path does not rely on tuple remnants left before VACUUM. Instead, it reads WAL records available on a replica or in WAL archives, then reconstructs deleted rows or pre-update row versions from those records. The recovery window therefore depends on WAL availability.
Current capabilities include:
PDU is intended as an emergency recovery aid. It is not a replacement for backups, PITR, or existing PostgreSQL recovery practices.
Project repository: https://github.com/wublabdubdub/PDU-PostgreSQLDataUnloader
Feedback is welcome, especially around heap/TOAST parsing, offline metadata reconstruction, WAL decoding, supported data types, and recovery edge cases.