• 312 words • 2 min
Problem statement: why did Miniflux stop saving entries after an Alpine upgrade?
The health check still passed. A full-text search query reproduced the write error without Miniflux:
% curl -fsS http://127.0.0.1:8080/healthcheck
OK
% doas -u postgres psql -X -d miniflux -c "SELECT to_tsvector('english', 'running');"
ERROR: could not access file "dict_snowball": No such file or directoryThe installed files belonged to PostgreSQL 19. PID 2102 was still running 18, from an executable that Alpine had already removed:
% pg_config --version --pkglibdir
PostgreSQL 19.0
/usr/lib/postgresql19
% doas readlink /proc/2102/exe
/usr/libexec/postgresql18/postgres (deleted)Alpine had replaced the packages, not migrated the database. The running server could still answer queries, but it could no longer load the version 18 Snowball library from disk.
I backed up the database and requested the major version explicitly. From a root shell:
set -eu
umask 077
backup=$(mktemp -d /root/knol-postgresql18-repair.XXXXXXXX)
doas -u postgres pg_dumpall --globals-only > "$backup/globals.sql"
doas -u postgres pg_dump -Fc miniflux > "$backup/miniflux.dump"
pg_restore --file=/dev/null "$backup/miniflux.dump"
apk add postgresql18 postgresql18-contrib
test "$(pg_versions get-default)" = 18I stopped the old process with pg_ctl, then reset OpenRC’s service state.
The server started on the same data directory. No pg_upgrade needed.
# rc-service miniflux stop
# doas -u postgres pg_ctl -D /var/lib/postgresql/18/data -m fast -w stop
waiting for server to shut down.... done
server stopped
# rc-service postgresql zap
# rc-service postgresql start
* Starting PostgreSQL 18 ... [ ok ]
# doas -u postgres psql -X -d miniflux -c "SELECT to_tsvector('english', 'running');"
to_tsvector
-------------
'run':1
(1 row)
# rc-service miniflux startI set only feed #133 due for a refresh:
# doas -u postgres psql -X -d miniflux -c 'UPDATE feeds SET next_check_at = now() WHERE id = 133;'
UPDATE 1
# doas -u miniflux /usr/bin/miniflux -config-file /etc/miniflux.conf -refresh-feedsMiniflux stored six new entries from that feed, including the Knuth article
that failed before (entry 496777). ∎
/bloggify,
then reviewed and edited by me.
More agent-assisted posts.