News for hackers. Stuff that matters.
Re:Show HN: I built this Postgres logger for you guys to che... by palijer on Thursday August 24, 2023 @09:02AM (#37248258)
Haha, exactly, but if you have developers who can drop production tables without the org knowing in advance and reviewing the change, you already have a big problem.

All our db operations like this go through our regular code review process for the db maintainers team, and instead of dropping tables, we just rename them with a prefix "to_be_dropped" as a scream test, then actually drop them a month later or so.

Recovery is much simpler for renaming than dropping.

Re:Show HN: I built this Postgres logger for you guys to che... by kvaranasi_ on Thursday August 24, 2023 @09:11AM (#37248343)
This is a nice idea to check if any dependencies are there on the table.
Re:Show HN: I built this Postgres logger for you guys to che... by palijer on Thursday August 24, 2023 @01:28PM (#37251888)
Haha, yeah, it's a hack we figured out the hard way, but it is super simple and effective.