Skip to content

fix(storage): preserve node columns for pinned snapshots - #1555

Open
Mrhs121 wants to merge 2 commits into
LadybugDB:mainfrom
Mrhs121:fix-1525
Open

Mrhs121 wants to merge 2 commits into
LadybugDB:mainfrom
Mrhs121:fix-1525

Conversation

@Mrhs121

@Mrhs121 Mrhs121 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #1525.

Preserve committed physical column slots while readers pin a checkpoint, so DROP COLUMN cannot invalidate the column IDs used by older catalog versions. Defer column compaction until readers finish and persist the remapped IDs. Restore retained layouts on reopen, pad dropped columns with NULLs for new rows, and discard rolled-back additions.

Validation: 33 regression cases passed; related transaction tests: 108 passed, 4 skipped; DDL tests: 104 passed.

DROP COLUMN followed by a checkpoint can renumber physical columns while
readers still use an older catalog, causing wrong values or crashes.
Keep committed column slots while readers pin the checkpoint and compact
them after the readers finish. Discard unobservable rolled-back additions.

Persist deferred column ID changes and restore retained physical layouts
when reopening. Pad dropped slots with NULLs for subsequent inserts.

Cover explicit and COPY checkpoints, repeated checkpoints, named graphs,
reopening, empty tables, nested types, and rolled-back additions.

Fixes LadybugDB#1525

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: a read-only transaction crashes or reads the wrong column after DROP and CHECKPOINT

1 participant