#288: reset schema before pg_restore — partitioned tables broke --clean #289
No reviewers
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#289
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "issue-288-restore-partitioned"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #288 (found during the isolated deployment run, #220).
pg_restore --clean --if-existsemittedDROP CONSTRAINTfor the per-partition primary keys ofread_events(partitioned since #224); PostgreSQL refuses to drop inherited constraints, so the restore exited non-zero and was reported FAILED although the content was restored correctly.Change: drop and recreate the
publicschema beforepg_restore(the database holds no extension objects outsidepg_catalog). All--cleandrops become no-ops (kept as belt and braces), and the restore becomes faithful — objects created after the backup no longer survive it. Runbook docs updated accordingly.Verified in the isolated environment of #220: restore of set
20260731-132200exits 0, a deliberately created post-backup table is gone, page content and allread_eventspartitions intact,/readyzfully green after api restart.Do not merge before the issue is closed manually — merge on green CI only.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AUtYMxwTCMHG9mVHnwbFg8