在仍然有许多活动事务的情况下执行 pg_dump
作为主题,当数据库中仍然有许多活动事务时,备份文件会发生什么情况。它导出实时还是仅导出部分备份?
提前致谢。
As subjects, what will happen to the backup file while there is still many active transaction in the database. Does it export realtime or just partially backups ?
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
pg_dump 在可序列化事务中运行,因此它会看到数据库的一致快照,包括系统目录。
但是,如果有人在转储启动时执行 DDL 更改,则可能会出现“缓存查找失败”错误。这类事情的时间窗口不是很大,但它有可能发生。请参阅:http://archives.postgresql.org/pgsql-bugs/2010 -02/msg00187.php
pg_dump runs in a serializable transaction, so it sees a consistent snapshot of the database including system catalogs.
However it is possible to get 'cache lookup failed' error if someone performs DDL changes while a dump is starting. The time window for this sort of thing isn't very large, but it can happen. See: http://archives.postgresql.org/pgsql-bugs/2010-02/msg00187.php
pg_dump 会给你一个一致的状态。任何在 pg_dump 发出之前未完成的事务都不会被反映。
pg_dump will give you a consistent state. Any transaction not completed before pg_dump has been issued will not be reflected.