英文:
What is the final state of a PostgreSQL dump if there are inserts/updates/deletes during the backup process?
问题
如果在进行pg_dump
备份PostgreSQL数据库时,同时对所有表执行插入/更新/删除操作,会发生什么情况?备份是否一致?备份的内容将会是什么?
如果在备份过程中采取了某种锁定机制,是否会阻止我进行插入/更新/删除操作?
或者备份过程会忽略在备份启动后启动的所有操作的结果吗?如果是这样,具体是如何工作的?所有操作的结果保存在哪里?
英文:
What happens if I'm making insert/update/delete operations on a PostgreSQL database (on all tables at the same time) while it's being backup-ed with pg_dump
? Is the dump consistent? What will be the content of the dump?
If some sort of locking mechanism is being placed during the backup, will that prevent me from doing insert/update/delete operations?
Or maybe the backup process will ignore the results of all operations launched after the backup process was started? If so, how does that work exactly? Where are the results of all operations saved?
答案1
得分: 1
即使数据库正在同时使用,它也能创建一致的备份。
该转储将包含数据库在开始转储时的状态。有关如何实现这一点的详细信息,请参阅并发控制的介绍。
英文:
> It makes consistent backups even if the database is being used concurrently
The dump will contain the state of the database as it was at the moment the dump was started. For details on how this is achieved, see the introduction to Concurrency Control
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论