如何缩小Postgresql数据库?

如何缩小Postgresql数据库?

问题描述:

它是Event Sentry应用程序的数据库,但是由于Event Sentry只是一个监视工具,所以不要了解它如何需要这么多数据。
默认数据库文件夹中有数百个1 Gig文件。
非常感谢您提供的任何帮助!卡尔

It's the dbase for an Event Sentry Application, but since Event Sentry is just a monitoring tool, don't see how it can require this much data. There are hundreds of 1 Gig files in the default database folder. Any assistance on this one is greatly appreciated! Carl

在此查看名为 vacuum的操作PostgreSQL:

Take a look at this operation called 'vacuum' in PostgreSQL:

http://www.postgresql.org/docs/9.5/static/routine-vacuuming.html

但是,在某些情况下,即使吸尘也不是解决那么多。在这种情况下,最好的办法是转储,重新创建数据库并还原它。

However, in some situations even vacuuming doesn't solve that much. In that case, the best to do is make a dump, recreate the database and restore it.