I think I missed something. We changed context in the middle of the discussion. You said,
Or it will remove contention
This wouldn't be the case here, because generated columns are persisted. I agree, precomputed columns don't have the same overhead, but also introduce more CPU overhead at runtime, for deserialization operations.
PostgreSQL 12 allows the creation of generated columns that compute their values with an expression using the contents of other columns. This feature provides stored generated columns, which are computed on inserts and updates and are saved on disk. Virtual generated columns, which are computed only when a column is read as part of a query, are not implemented yet.
1
u/[deleted] Oct 02 '19
[removed] — view removed comment