Data & Analytics
A dbt v2 Redshift table swap may expose a missing table
A reported transaction change in Redshift materialization can increase commit waits and expose readers during renames.
November 17, 2026
A table model that finishes eventually can still break readers during its replacement. dbt issue #17158 reports dbt v2 Redshift table materialization sending each statement in a separate transaction rather than grouping the swap. The reporter observed higher commit queue wait and a short interval with no target table between renames. Those measurements belong to that environment; reproduce before extrapolating them.
Measure the transaction shape
Run one non-critical table model with a grant in a staging Redshift cluster. Inspect sys_query_history transaction IDs for create, rename, analyze and grant statements, and compare with the pinned v1 job. Count commits and read availability through the swap. dbt's materialization guide explains the table rebuild contract; the database transaction boundary still needs a direct test.
Tie performance to commit contention
Separate model SQL execution time from commit queue time. A v2 rollout may appear slower because each DDL step waits to commit, even if transformation SQL is unchanged. Record build duration, transaction count and reader errors across several runs before changing warehouse capacity or claiming a regression.
Decide on rollback or a reviewed override
The issue author describes a custom materialization that adds explicit transaction control. dbt documents custom materializations, but an override changes failure and rollback behavior. Treat it as code requiring tests for pre-hooks, failed nodes, grants and concurrent readers. A version rollback may be safer while the upstream discrepancy is unresolved.
Adovo’s view
A materialization is a promise about what downstream readers can observe. If a migration changes the atomicity of a table swap, it changes the data product even when the model SQL stays identical. Test the reader's view of the transition.
