▲ | alexanderscott 7 months ago | |
this is a “soft delete”. as the author notes, depending on the nature of the data being stored a soft delete does not meet the requirements of many data privacy laws and compliance regulations (like GDPR’s right to erasure). | ||
▲ | kijin 7 months ago | parent | next [-] | |
There are different kinds of soft delete. I've had cases where the rows in question absolutely could not be hard deleted, because of legacy foreign key relations. But the PII in those rows had to go. So we did a kind of "firm delete" by setting all columns (except the PK and a few necessary flags) to their default values and/or null. | ||
▲ | isbvhodnvemrwvn 7 months ago | parent | prev [-] | |
And in postgres soft delete is more expensive than a regular delete because it's effectively an insert and update, while delete is just an update. |