From 205ef1d8872932d4ef195764e88c93940bc142b7 Mon Sep 17 00:00:00 2001 From: Ben Rusholme Date: Wed, 14 Oct 2026 21:56:32 -0700 Subject: [PATCH] load, crossmatch, statistics: the child tables are logged rapid migration 20261013-01 (Ben, 2026-10-13) sets every table LOGGED and drops SET UNLOGGED from the three child-table functions, after crash recovery on 2026-10-02 emptied the unlogged source and object tables under result sets that still read complete. The three pages described the tables as unlogged; they now say logged, where dev's are unlogged, and load gives the reason once. Co-Authored-By: Claude Opus 5.5 --- system/crossmatch.md | 5 +++-- system/load.md | 10 +++++++--- system/statistics.md | 7 ++++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/system/crossmatch.md b/system/crossmatch.md index a631f49..2464f62 100644 --- a/system/crossmatch.md +++ b/system/crossmatch.md @@ -137,8 +137,9 @@ The rebuild's service login holds table grants only; three SECURITY DEFINER functions owned by `rapidporole` provide the table operations (migration `20260924-04`, EXECUTE granted by `-06`): -- `create_field_object_tables(field)`: `dev`'s creation, unlogged, - owner `rapidporole`, its four indexes (`aid` on both, the Q3C position +- `create_field_object_tables(field)`: `dev`'s creation, owner + `rapidporole`, logged where `dev`'s tables are unlogged (migration + `20261013-01`), its four indexes (`aid` on both, the Q3C position index on `astroobjects`, `sid` on `merges`) and its grants, plus the rebuild's run columns, set-scoped keys and `result_set`/`run` indexes. An advisory lock serialises two stages making the same pair. A table diff --git a/system/load.md b/system/load.md index cf4bcde..5a276a3 100644 --- a/system/load.md +++ b/system/load.md @@ -88,8 +88,8 @@ EXECUTE granted by `-06`): - `create_sources_child_table(obs_date, sca)`: `dev`'s creation (`LIKE sources INCLUDING DEFAULTS INCLUDING CONSTRAINTS`, owner `rapidporole`, - unlogged, `INHERIT sources`), its eight indexes (`pid`, `expid`, `sca`, - `field`, `flags`, `mjdobs`, `sid`, and the Q3C position index), and its + `INHERIT sources`), its eight indexes (`pid`, `expid`, `sca`, `field`, + `flags`, `mjdobs`, `sid`, and the Q3C position index), and its grants to `rapidreadrole` and `rapidadminrole`, plus the rebuild's service login and `rapid_read` where those roles exist. An advisory lock serialises two loads making the same table. The function also @@ -98,7 +98,11 @@ EXECUTE granted by `-06`): `run` for run deletion and by `result_set` for crossmatch. There is no per-child UNIQUE on `(pid, id, isdiffpos)`: scratch runs coexist over the same logical inputs by design, and the done check in `load`'s - inputs guards uniqueness within one run. + inputs guards uniqueness within one run. The table is logged, where + `dev` makes it unlogged (migration `20261013-01`): crash recovery + empties an unlogged table, and after rapid-db stopped uncleanly on + 2026-10-02 the result sets still read complete with no rows behind + them, so re-running `load` did nothing. - `cluster_sources_child_table(obs_date, sca)`: `dev`'s CLUSTER on the position index and ANALYZE. The `maintain` stage calls it by default; `load` can call it per image through `[child_tables] diff --git a/system/statistics.md b/system/statistics.md index 63d34a4..4cab296 100644 --- a/system/statistics.md +++ b/system/statistics.md @@ -88,9 +88,10 @@ The stage runs in one transaction: without a disposition. 3. Make `astroobjectsmeta_` if it does not exist, through `create_astroobjectsmeta_child_table`. The function applies `dev`'s - fillfactor 70, unlogged storage, its `nsources` and Q3C `meanradec` - indexes and its grants, plus the rebuild's set-scoped UNIQUE and the - `run` and `result_set` indexes. + fillfactor 70, its `nsources` and Q3C `meanradec` indexes and its + grants, plus the rebuild's set-scoped UNIQUE and the `run` and + `result_set` indexes. The table is logged where `dev`'s is unlogged + (migration `20261013-01`). 4. Query the membership: ```sql