Rebuild: the merger stops when a pass over the file keys decides nothing
Waiting files counted as work, so the merge loop re-read them for its whole 30 s budget every minute: Postgres used ~a core even without workers. Now ~4% at rest, and storing a boneless range costs Postgres ~0.7–1.9 s of CPU (it was 33 s with the loop running). Chunk payloads are stored EXTERNAL (zstd already; no pglz attempt). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
73fc9aabdf
commit
821de668d0
3 files changed
+15
-4
No files matched your search
@@ -24,6 +24,8 @@ export default class extends BaseSchema {
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
PRIMARY KEY (id, created_at)
|
||||
) PARTITION BY RANGE (created_at)${where}`)
|
||||
// The payload is zstd already: no pglz attempt on it.
|
||||
this.schema.raw(`ALTER TABLE release_chunks ALTER COLUMN payload SET STORAGE EXTERNAL`)
|
||||
this.schema.raw(`CREATE INDEX release_chunks_release_idx ON release_chunks (release_id)`)
|
||||
this.schema.raw(`CREATE INDEX release_chunks_range_idx ON release_chunks (range_id)`)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user