Move logs from array to dedicated table
All checks were successful
/ release (push) Successful in 1m23s
All checks were successful
/ release (push) Successful in 1m23s
This avoids the append problem which bloats the database to 200+ gb in a month and shrinks again to 5g with a full vacuum
This commit is contained in:
parent
15a960da19
commit
f52f517dc1
9 changed files with 99 additions and 11 deletions
3
migrations/000024_migrate_logs.up.sql
Normal file
3
migrations/000024_migrate_logs.up.sql
Normal file
|
@ -0,0 +1,3 @@
|
|||
INSERT INTO logs (task_id, message)
|
||||
SELECT id as task_id, l as message
|
||||
FROM tasks, unnest(log) l ORDER BY task_id ASC;
|
Loading…
Add table
Add a link
Reference in a new issue