简体   繁体   English

Postgres 中的 Mirth 数据库导致存储问题

[英]Mirth database in Postgres causing storage problems

I have set up mirth on ubuntu server using Postgres database(on the same server).我已经使用 Postgres 数据库(在同一台服务器上)在 ubuntu 服务器上设置了 mirth。 The problem is mirth messages takes up all the storage after some hours and mirth crashes.问题是欢乐消息在几个小时后占用了所有存储空间并且欢乐崩溃了。 I want mirth to be continuously running on my server.我希望 mirth 在我的服务器上持续运行。

I've enabled message pruning but that only deletes the message data but does not free storage.我启用了消息修剪,但这只会删除消息数据,但不会释放存储空间。 Although 'Remove all messages' option in mirth launcher UI frees the storage.尽管 mirth 启动器 UI 中的“删除所有消息”选项可以释放存储空间。 I've also tried to free the storage by truncating the tables, that works, but causes the error and no messages can be received further, and also WAL segments gets allocated.我还尝试通过截断表来释放存储空间,这可行,但会导致错误并且无法进一步接收任何消息,并且 WAL 段也被分配。

After you prune the messages and then vacuum the tables, space should be freed up for internal reuse, but will probably not be handed back to the OS (for use in different files, or to show up in df ).修剪消息然后清理表之后,应该释放空间以供内部重用,但可能不会交还给操作系统(用于不同的文件,或显示在df中)。 You can use pg_freespacemap or maybe pgstattuple to check if space is available for internal reuse, or pg_stat_activity orpg_stat_progress_vacuum to see if vacuuming is currently underway.您可以使用pg_freespacemappgstattuple来检查空间是否可用于内部重用,或使用 pg_stat_activity 或pg_stat_progress_vacuum来查看当前是否正在进行清理。 Vacuuming should happen automatically after a large fraction of a table is deleted, unless you have gone out of your way to prevent it from happening.删除表的大部分内容后,应该会自动进行清理,除非您已经竭尽全力防止它发生。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM