No, postgresql is not using the external disk.
I just checked /var/log
and indeed found a bunch of these :
2024-02-15 18:55:03.854 CET [743] LOG: database system is ready to accept connections
2024-02-15 18:55:06.497 CET [743] LOG: server process (PID 985) was terminated by signal 11: Segmentation fault
2024-02-15 18:55:06.497 CET [743] DETAIL: Failed process was running: SELECT "music_album"."id", "music_album"."fid", "music_album"."mbid", "music_album"."uuid", "music_album"."from_activity_id", "music_album"."creation_date", "music_album"."body_text", "music_album"."title", "music_album"."artist_id", "music_album"."release_date", "music_album"."release_group_id", "music_album"."attachment_cover_id", "music_album"."type", "music_album"."attributed_to_id", "music_album"."description_id", COUNT("music_track"."id") AS "_tracks_count", (SELECT W0."id" FROM "music_upload" W0 INNER JOIN "music_track" W2 ON (W0."track_id" = W2."id") WHERE (W0."import_status" IN ('finished', 'skipped') AND W0."library_id" IN (SELECT V0."id" FROM "music_library" V0 INNER JOIN "federation_actor" V1 ON (V0."actor_id" = V1."id") WHERE ((V0."actor_id" = 1 AND V0."privacy_level" = 'me') OR (V1."domain_id" = 'musique.chezmwa.fr' AND V0."privacy_level" = 'instance') OR V0."privacy_level" = 'everyone' OR V0."id" IN (SELECT U0."target_id" FROM "federation_libraryfollow" U0 WHERE (U0."actor_id" = 1 AND U0."appr
2024-02-15 18:55:06.497 CET [743] LOG: terminating any other active server processes
2024-02-15 18:55:06.502 CET [986] funkwhale@funkwhale FATAL: the database system is in recovery mode
2024-02-15 18:55:06.510 CET [743] LOG: all server processes terminated; reinitializing
2024-02-15 18:55:06.562 CET [990] LOG: database system was interrupted; last known up at 2024-02-15 18:55:03 CET
2024-02-15 18:55:06.566 CET [993] funkwhale@funkwhale FATAL: the database system is in recovery mode
2024-02-15 18:55:06.599 CET [995] funkwhale@funkwhale FATAL: the database system is in recovery mode
2024-02-15 18:55:06.636 CET [998] funkwhale@funkwhale FATAL: the database system is in recovery mode
2024-02-15 18:55:06.670 CET [1000] funkwhale@funkwhale FATAL: the database system is in recovery mode
2024-02-15 18:55:06.675 CET [990] LOG: database system was not properly shut down; automatic recovery in progress
2024-02-15 18:55:06.687 CET [990] LOG: invalid record length at 0/F0A23C8: wanted 24, got 0
2024-02-15 18:55:06.687 CET [990] LOG: redo is not required
2024-02-15 18:55:06.703 CET [1003] funkwhale@funkwhale FATAL: the database system is not yet accepting connections
2024-02-15 18:55:06.703 CET [1003] funkwhale@funkwhale DETAIL: Consistent recovery state has not been yet reached.
2024-02-15 18:55:06.721 CET [991] LOG: checkpoint starting: end-of-recovery immediate wait
2024-02-15 18:55:06.743 CET [1005] funkwhale@funkwhale FATAL: the database system is not yet accepting connections
2024-02-15 18:55:06.743 CET [1005] funkwhale@funkwhale DETAIL: Consistent recovery state has not been yet reached.
2024-02-15 18:55:06.767 CET [991] LOG: checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.014 s, sync=0.005 s, total=0.052 s; sync files=3, longest=0.002 s, average=0.002 s; distance=0 kB, estimate=0 kB
2024-02-15 18:55:06.785 CET [743] LOG: database system is ready to accept connections
I remember some SQL, so is there some way to find the issue directly inside the database maybe ?