Skip to content

db: every table LOGGED; tests and the release fake target rapid - #248

Merged
rusholme merged 2 commits into
rebuildfrom
logged-tables
Oct 14, 2026
Merged

rusholme merged 2 commits into
rebuildfrom
logged-tables

Conversation

@rusholme

Copy link
Copy Markdown
Collaborator

Part of the 2026-10-13 Postgres fresh start: rapid-db's two databases are dropped and one rapid is rebuilt from this stream, every table LOGGED.

Why. On 2026-10-02 rapid-db's postgres stopped uncleanly. Crash recovery reset every UNLOGGED relation, so the sources, merges and astroobjects child tables came back empty while result_sets still read complete. Re-running load was a silent no-op. (Probe: all 279 UNLOGGED files in the old rapid_rebuild had mtime 2026-10-02 18:40:45 UTC.)

What.

  • database/migrations/20261013-01-logged-tables.sql, additive (applied files are never edited):
    • a DO block sets every UNLOGGED public table LOGGED. On a fresh database that is sources and xsources; on an older one it also covers existing children.
    • create_sources_child_table, create_field_object_tables and create_astroobjectsmeta_child_table are replaced with bodies byte-identical to their latest definitions (20260923-09, 20260924-04) minus the SET UNLOGGED line. Owner and REVOKE are restated as those files do.
  • The four relpersistence assertions in tests/db change from u to p.
  • FakeReleaseDB defaults to dbname="rapid", and test_release_cut and test_recovery use the same name. database_target itself comes from the connection, so no code default changes.

Considered and not done: squashing the 32 migrations into one new baseline while no applied database survives. It's a cleaner end state but touches the CI drift check and the release hook; that's for the team's first review.

Verification: CI (db-migrations.yml applies from empty and re-applies; the test suite runs against the result).

🤖 Generated with Claude Code

rusholme and others added 2 commits October 13, 2026 19:41
20261013-01-logged-tables.sql sets every UNLOGGED table in public to
LOGGED and replaces the three child-table functions without their
SET UNLOGGED line. The 2026-10-02 unclean stop on rapid-db emptied every
UNLOGGED relation while result sets still read complete. The persistence
assertions in tests/db follow, and the release fake and tests name the
one database, `rapid`, that the rebuild moves into.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efault

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rusholme
rusholme merged commit 6f8583f into rebuild Oct 14, 2026
11 checks passed
@rusholme
rusholme deleted the logged-tables branch October 14, 2026 03:34
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.

1 participant