sraoss / pgsql-ivm

IVM (Incremental View Maintenance) development for PostgreSQL
Other
129 stars 12 forks source link

Use weaker lock on matview if possible #119

Closed yugo-n closed 3 years ago

yugo-n commented 3 years ago

If the view has only one base table in this query, we can use RowExclusiveLock instead of AccessExclusiveLock, because we don't need to wait other concurrent transaction's result in order to maintain the view in this case. When the same row in the view is affected due to concurrent maintenances, a row level lock will protect it.