On 2018-07-26 12:54:19 -0500, Dimitri Maziuk wrote: > >> "LOG: logical decoding found consistent point at 19/E6942440" > >> DETAIL: There are no running transactions." > >> > >> Others with more experience in this area would need to fill whether that > >> might account for the 13 million files in the ~snapshot/ directory. > > > > That indicates there's some error handling issues to be resolved. Petr? > > It logs "COPY TO STDOUT", does that actually cache to disk (in ~snapshot/)? No, it doesn't. The snapshots are internal to logical replication. > Would it be safe to delete every file in ~snapshot/ older than some > X-number of minutes? (And what a good X might be?) You shouldn't manually delete them. But an explicit 'checkpoint;' (and all automatically triggered ones), should do so for all that are older. Is there a chance that you have some old leftover replication slots around? Because that'd prevent cleanup? What does SELECT * FROM pg_replication_slots ; return? Greetings, Andres Freund