Skip to content

fix: Enforce read-committed for TRUNCATE cleanup and add TRUNCATE trigger support - #248

Merged
MisterVVP merged 1 commit into
dev-implement-cleanup-for-truncate-on-push-configsfrom
dev-fix-codex-review-issues-for-pr-#247
Sep 15, 2026
Merged

MisterVVP merged 1 commit into
dev-implement-cleanup-for-truncate-on-push-configsfrom
dev-fix-codex-review-issues-for-pr-#247

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Sep 15, 2026 •

Copy link
Copy Markdown
Owner

Motivation

  • Ensure TRUNCATE-based cleanup cannot run under snapshot isolation where a stale snapshot could miss concurrently committed local push configs.
  • Extend SQL generation, schema validation, docs, and tests to fully support statement-level TRUNCATE triggers and validation of their behavior.

Description

  • Added a TRUNCATE branch to the push-config cleanup trigger that raises an exception if the current transaction isolation is repeatable read or serializable and otherwise deletes locally-owned push configs; updated generated function body in BuildDeleteTaskPushConfigsFunctionBody accordingly.
  • Introduced kPostgresTruncateTriggerOperation and a new error message constant to centralize the TRUNCATE literal and isolation error text, and updated trigger/SQL builders to use the literal consistently.
  • Expanded the push-schema validation SQL and parameter list to assert the presence and literal form of the TRUNCATE handling in the cleanup function, and increased related parameter/count constants.
  • Updated documentation (book/src/server/storage.md and docs/storage.md) to describe the new AFTER TRUNCATE trigger behavior and the transaction-isolation rejection; added/adjusted several tests and test helpers to validate the new behavior and literal-case preservation.

@MisterVVP MisterVVP added the codex Automatic label added by codex agent. Should not be used label Sep 15, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP changed the title Enforce read-committed for TRUNCATE cleanup and add TRUNCATE trigger support fix: Enforce read-committed for TRUNCATE cleanup and add TRUNCATE trigger support Sep 15, 2026
@MisterVVP MisterVVP added AI agent AI agent contribution and removed codex Automatic label added by codex agent. Should not be used labels Sep 15, 2026
@MisterVVP
MisterVVP merged commit f7475ca into dev-implement-cleanup-for-truncate-on-push-configs Sep 15, 2026
17 checks passed
@MisterVVP
MisterVVP deleted the dev-fix-codex-review-issues-for-pr-#247 branch September 15, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI agent AI agent contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant