postgres=# select * from sessions where video_id = 'l-0IP-_meD0';

Simplify recovering from a DROP TABLE

· 108:13 · Safety & recovery

Log a recovery landmark when destructive DDL commits.

session summary

The group designed a recovery landmark for accidental DROP TABLE. They first considered emitting a named restore-point WAL record, then traced deletion through parser, dependency, permission, and lock paths. Rollback and the absence of a fresh LSN before any WAL write made that design misleading. They pivoted to logging a restore LSN after the table lock is acquired but before deletion, restricted it to ordinary tables, demonstrated the output, and prepared a small pgsql-hackers patch.

timecodes

  1. Two recovery and restore ideas
  2. Choosing the DROP TABLE recovery problem
  3. Considering an automatic restore-point record
  4. Which dropped objects need protection
  5. Tracing DROP through parser and dependency code
  6. Intent, permissions, locks, and rollback
  7. Why no usable LSN exists before WAL
  8. Final log message and mailing-list patch