You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add primary keys to stats tables to prevent ctid-based update conflicts
When using PostgreSQL as the metadata catalog with multiple concurrent
writers (e.g., Kafka Connect tasks), UPDATE statements on tables without
primary keys cause postgres_scanner to use ctid (physical row ID) for
row identification. This leads to serialization failures because ctid
changes when rows are updated due to PostgreSQL's MVCC.
Changes:
- Add PRIMARY KEY to ducklake_table_stats on table_id
- Add composite PRIMARY KEY to ducklake_table_column_stats on (table_id, column_id)
This allows postgres_scanner to use logical key-based updates instead of
ctid-based updates, eliminating "could not serialize access due to
concurrent update" errors under high concurrency.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments