Skip to content

Commit 9da253d

Browse files
committed
fix: keep PostgreSQL rollback atomic
1 parent e5a2b8d commit 9da253d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎src/openstatspec/sql/inplace_transform.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,13 @@ def _run_in_place_submission(
881881
)
882882
return result
883883
except Exception:
884-
if journal.get("added_columns"):
884+
# PostgreSQL rolls back the DDL and catalog writes atomically. Once
885+
# that rollback releases the dataset lock, a separate compensation
886+
# transaction could delete artifacts created by a waiting apply.
887+
if (
888+
journal.get("added_columns")
889+
and profile.name != "postgresql"
890+
):
885891
try:
886892
_compensate_failed_apply(
887893
engine,

0 commit comments

Comments
 (0)