有人可以解释一下参数 autovacuum_naptime 吗?
我看了官方的解释,但还是不太明白这个参数。有人可以解释一下参数 autovacuum_naptime 吗?多谢 !
I read the explaination from official, But i'm still cant not understand the parameter well. Can someone explain the parameter autovacuum_naptime ? thanks a lot !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 postgresql 在每次自动清理之间等待的最短时间。
假设您保留默认值 1 分钟,则在最后一个完成后,至少有 1 分钟没有真空。
每个数据库的时间是分开的,postgresql 尝试运行尽可能多的真空。因此,如果您有 4 个数据库且 sleeptime 值为 1 分钟,则真空进程将在新数据库中每 20 秒运行一次。
我希望我说得清楚,否则请随时询问一些细节。
It is the minimum time that postgresql wait between each auto vacuum.
Say for example you kept the default value of 1 minute, there will be at least 1 minute without vacuum after the last one finished.
The time is for each database separately and postgresql try to run as much vacuum as possible. So if you have 4 databases and the naptime value is 1 min, a vacuum process will run every 20 seconds in a new database.
I hope I'm clear, otherwise feel free to ask some details.
这是 autovacuum 运行之间的最短时间。有相当多的参数可以决定运行真空,但这个参数设置了最短的“暂时不要执行”时间,以便您的数据库不会连续运行真空操作。
否则,您可能会发现自己处于不断清理而没有完成任何实际工作的情况:-)
有关所有参数的完整详细信息,请参见 此处。
It's the minimum time between autovacuum runs. There are quite a few parameters which can decide to run a vacuum but this one sets a minimum "don't do it yet" time so that your database is not continuously running vacuum operations.
Otherwise you may find yourself in a situation where you're continuously vacuuming and no real work gets done :-)
Full details on all the parameters can be found here.