Closed colin-rogers-dbt closed 6 months ago
We use a set object to store SQL statements to be executed as part of an index operation. Because this is unordered this will occassionally cause us to execute statements in the wrong order. See: https://github.com/dbt-labs/dbt-postgres/blob/6a1897e6b00a60ae8c9ad762453b3a31ff244d2d/dbt/adapters/postgres/relation.py#L78
set
Statements are ordered correctly
Run this a couple of times:
hatch run integration-tests:all tests/functional/materializations/materialized_view_tests/test_materialized_view.py::TestPostgresMaterializedViewChangesApply
No response
- OS: - Python: - dbt-postgres:
Re-opening for the backport.
Is this a new bug?
Current Behavior
We use a
set
object to store SQL statements to be executed as part of an index operation. Because this is unordered this will occassionally cause us to execute statements in the wrong order. See: https://github.com/dbt-labs/dbt-postgres/blob/6a1897e6b00a60ae8c9ad762453b3a31ff244d2d/dbt/adapters/postgres/relation.py#L78Expected Behavior
Statements are ordered correctly
Steps To Reproduce
Run this a couple of times:
Relevant log output
No response
Environment
Additional Context
No response