Spaces:
Paused
Paused
Commit History
-
fix: keepalive loop — re-assert FUSE dirs every 5s during postgres runtime
FUSE drops empty dirs not only at startup but also during runtime (seen at 00:56:12+10min: checkpoint ERROR pg_logical/snapshots). One-shot repair at start is not enough. Add background loop that checks and recreates missing dirs every 5s while postgres is running. Trap EXIT to clean up loop PID.e8f054f
-
fix: chown dirs created by root wrapper so postgres (mem0) can read them
pg_subtrans/0000 existed but was owned by root — wrapper runs as root, creates dir, then gosu mem0 postgres tries to open it -> Permission denied. Fix: chown all recreated dirs to mem0:mem0 before exec gosu.bf79b7b -
fix: pg_subtrans/pg_snapshots FUSE drop + mem0-api HOME=/root permission error
- postgres-fuse-wrap: add pg_subtrans, pg_xact, pg_multixact/members/offsets to mkdir-only list (contents written by Postgres, must not be deleted). Add pg_snapshots + pg_logical/snapshots/mappings to fully-empty list. Remove .gitkeep from pg_logical dirs — Postgres rejects non-pg files there. - supervisord: add HOME=/opt/data to mem0-api environment so mem0 library does not try os.makedirs('/root/.mem0') and fail with PermissionError.8aef3cf -
fix: postgres wrapper — re-run FUSE dir repair on every postgres start
- Add postgres-fuse-wrap script: recreates FUSE-volatile dirs (pg_replslot, pg_twophase, pg_dynshmem, pg_notify, pg_tblspc) immediately before each postgres invocation. Fixes FATAL that occurred ~80s into crash-recovery when FUSE dropped empty dirs between entrypoint Stage-1 and Postgres reading them. - supervisord: postgresql program uses postgres-fuse-wrap, user=root (drops to mem0 via gosu inside wrapper). Global user changed root→root so per-program user= directives take effect. - entrypoint: remove redundant FUSE repair from Stage 1; add repair before Stage-2 pg_ctl start (fresh-init path). Drop 'gosu mem0 supervisord' since supervisord now runs as root intentionally. - Dockerfile: COPY + chmod postgres-fuse-wrap.f8a7f2f