Hey dear list, after a fex years of experiments and crash, I ended up with a grossly bloated postgres folder. I had about 8 Go of useless files. All is in a virtualbox, so I'm sure to be able to reproduce exactly, and fried my postgres folder a couple of time before getting it right.
Julien (Rouhaud) helped me to find those useless files via SQL. The idea is to list files in postgres directory with `pg_ls_dir`, then to check that the dir name correspond to something useful (using pg_relation_filenode). ------------------ https://gist.github.com/Remi-C/926eaee04d61a7245eb8 ------------------ To be sure I export the found files list, then use oid2name to check that no file is recognized. files can then be deleted (using plpythonu in my case). So far a vacuum full analyze raise no errors. Warning : for this to work, the SQL query must be sent while connected to the database to clean. Hope this may be useful Cheers, Rémi-C