3 ms·
Wouldn't a write lock on that structure become a hotly contended resource? Globally shared, globally writable structures tend not to scale very well. Postgres
by rosser 9y ago
Wouldn't a write lock on that structure become a hotly contended resource? Globally shared, globally writable structures tend not to scale very well.
Postgres already has the notion of creating and destroying transaction ids for each row version attached to that tuple (row version). That distributes your "structure" across the rows involved in it. Just because you delete a row version (whether by deleting that row, or by updating it — which in MVCC is synchronously deleting the old version and inserting a new one) doesn't mean that row version isn't still visible to other concurrent activity, specifically including read-only activity. You'd therefore have to write to this proposed structure on completing every read or write.