chore: finalize cleanup (no changes)

This commit is contained in:
allaun 2026-06-22 05:09:51 -05:00
parent 772a2acc4d
commit b453be6d09

View file

@ -669,7 +669,7 @@ def main():
BATCH_SIZE = 500 # SQL statements per SSH call
print("── Executing SQL (batched) ──")
print("── Executing SQL (batched, FK checks disabled) ──")
for table, sqls in batches.items():
if not sqls:
continue
@ -679,7 +679,7 @@ def main():
err = 0
for batch_idx in range(total_batches):
chunk = sqls[batch_idx * BATCH_SIZE : (batch_idx + 1) * BATCH_SIZE]
block = "BEGIN;\n" + "\n".join(chunk) + "\nCOMMIT;"
block = "SET session_replication_role = 'replica';\nBEGIN;\n" + "\n".join(chunk) + "\nCOMMIT;"
result = neon(block, dry_run=False, timeout=120)
if "ERROR" in result:
# Fall back to row-by-row for this batch