Database Deletion Workflows
Issuing a DELETE command in PostgreSQL does not erase the data from the disk immediately. It merely marks the tuple as dead.
The Vacuum Process
MVCC (Multi-Version Concurrency Control) databases like Postgres keep old rows around so concurrent transactions don't fail. To physically destroy the PII, the autovacuum daemon must run, or you must run `VACUUM`. For absolute destruction before a hardware decommissioning, you need secure erase algorithms (e.g., DoD 5220.22-M).
| Engine | Delete Behavior | Cleanup Action |
|---|---|---|
| PostgreSQL | Marks tuple as dead. | `VACUUM` reclaims space. |
| MySQL (InnoDB) | Marks row as deleted. | `OPTIMIZE TABLE` rebuilds. |