Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do DELETE instead of TRUNCATE when locks aren't acquired
After compression, the uncompressed part of the chunk is truncated. This requires upgrading the `ExclusiveLock` to an `AccessExclusiveLock` and hence is sometimes blocked by other other operations, including reads, on the chunk. This leads to longer compress times or potential deadlocks. Instead of this, we fall back to deleting the tuples in the chunk row-by-row when the upgraded lock isn't immediately acquired.
- Loading branch information