Frédéric Guillot
5403ca09f6
feat(storage): add limit parameter to ClearRemovedEntriesContent
...
Without the limit, this query is going to hangs forever on large
databases with millions of entries.
2025-08-17 17:39:04 -07:00
Frédéric Guillot
a16ac51326
refactor(storage): split DeleteContentRemovedEntries
into 2 functions and fix condition
...
- Add `content IS NOT NULL` to avoid clearing the same entries over and over
- Create `DeleteRemovedEntriesEnclosures` and `ClearRemovedEntriesContent` that report individual counts
2025-08-16 21:19:28 -07:00
jvoisin
5c26e06780
feat(entry): keep only metadata for removed entries
...
This should significantly shrink the space taken by miniflux' database:
```sql
miniflux=#
SELECT
relname, pg_size_pretty(pg_total_relation_size(relname::regclass))
FROM
pg_catalog.pg_statio_user_tables
ORDER BY
pg_total_relation_size(relname::regclass)
DESC;
relname | pg_size_pretty
----------------------+----------------
entries | 158 MB
icons | 3312 kB
enclosures | 1568 kB
sessions | 1048 kB
feeds | 288 kB
feed_icons | 72 kB
users | 64 kB
user_sessions | 64 kB
categories | 48 kB
integrations | 32 kB
api_keys | 32 kB
webauthn_credentials | 24 kB
schema_version | 16 kB
acme_cache | 16 kB
(14 rows)
miniflux=#
```
This should close #3524
2025-08-16 20:57:59 -07:00
Frédéric Guillot
c0e954f19d
Implement structured logging using log/slog package
2023-09-24 22:37:33 -07:00
Frédéric Guillot
168a870c02
Move internal packages to an internal folder
...
For reference: https://go.dev/doc/go1.4#internalpackages
2023-08-10 20:29:34 -07:00