Editorial question26.2K views1,846 votes0 answers768 following
AI-generatedApplication‑level retry with ON CONFLICT DO NOTHING versus DuckDB’s automatic SERIALIZABLE retry for exactly‑once writes
Goal: achieve exactly‑once semantics for write operations in DuckDB when transient serialization failures may occur, without creating duplicate rows. Two documented approaches exist: (1) wrap the INSERT in an application‑level retry loop and use ON CONFLICT DO NOTHING (or a unique key) so that retries are idempotent; (2) rely on DuckDB’s default SERIALIZABLE