release_inspections in the catalog's tablespace (the NVMe)
Test and deploy / test (push) Successful in 53s
Test and deploy / edge (push) Successful in 2m7s
Test and deploy / deploy (push) Successful in 2m33s

The prober writes it every flush and the merger looks inner stems up in it,
so it no longer belongs with the write-once payloads on the HDD. Moved on
homelab by hand (prober and merger stopped); the migration is a no-op there
and moves it on a new deploy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-13 10:09:20 +02:00
1 parent 229189f35c
commit 8e4ed774c0
1 file changed
+27
@@ -0,0 +1,27 @@
import { BaseSchema } from '@adonisjs/lucid/schema'
/**
* release_inspections in the catalog's tablespace (default_tablespace: nvme
* on homelab), not CHUNK_TABLESPACE: the prober writes it every flush and
* the merger looks stems up in it (release_inspections_inner_stem_idx), so it
* isn't only read per release any more (migration 1700). Its flushes took
* 35–83 s a minute with the table on the HDD (LOG.md 2026-10-13 (43)).
* Homelab was moved by hand first; here a no-op when it's there already, or
* without a default tablespace (tests).
*/
export default class extends BaseSchema {
async up() {
this.defer(async (db) => {
const { rows } = await db.rawQuery(
`SELECT current_setting('default_tablespace') AS target,
(SELECT t.spcname FROM pg_class c LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace WHERE c.relname = 'release_inspections') AS current`
)
const { target, current } = rows[0]
if (!target || current === target) return
await db.rawQuery(`ALTER TABLE release_inspections SET TABLESPACE ${target}`)
await db.rawQuery(`ALTER INDEX release_inspections_pkey SET TABLESPACE ${target}`)
})
}
async down() {}
}