Summary
Migration number 25 (add-split-size), introduced in #6035, adds a GENERATED ALWAYS AS ... STORED column to the splits table.
In our environment (~1.5M rows in splits table), we observed:
- CPU spike on the PostgreSQL instance
- Lock-related metrics spike
- Connection acquisition timeouts
Adding a GENERATED ALWAYS AS ... STORED column requires an exclusive lock to compute and store values for all existing rows, causing incoming queries to queue up.
Environment
- PostgreSQL metastore with ~1.5M rows in
splits table
- Upgrading to a version containing migration number 25 (
add-split-size)
Summary
Migration number 25 (
add-split-size), introduced in #6035, adds aGENERATED ALWAYS AS ... STOREDcolumn to thesplitstable.In our environment (~1.5M rows in
splitstable), we observed:Adding a
GENERATED ALWAYS AS ... STOREDcolumn requires an exclusive lock to compute and store values for all existing rows, causing incoming queries to queue up.Environment
splitstableadd-split-size)