Can I disable SELECT on rows that are been used inside of a transaction?
For example, rows in table potatoes are being destroyed in transaction 1, and it takes a long time to do so. In transaction 2, there is SELECT* on the potatoes table. I don't want to select those records that are being used in transaction 1.
So, the result for SELECT* potatoes is without the records that are being used in transaction 1.
Is isolation level serializable right fit for transaction 1, so transaction 2 can't select those rows? Or I need to lock those records with some lock mode?
I'm trying to avoid flags in the database or Redis.
Things I found: