News for hackers. Stuff that matters.
Re:Instead of deleting account, NYT appends ‘1000’ to userna... by ars on Tuesday April 28, 2020 @03:55PM (#23011131)
Another option is to add an "archive" table, where deleted records are moved to that table.

It can get complex (for example foreign keys need special handling).

One option is table partitioning: https://www.2ndquadrant.com/en/blog/postgresql-12-foreign-ke...

You partition the table based on deleted or not, and then query either both tables together, or just the active table.

Re:Instead of deleting account, NYT appends ‘1000’ to userna... by jackcosgrove on Tuesday April 28, 2020 @04:06PM (#23011265)
Partitioning sounds like a great solution, thank you for this.