Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以查询 db 中有多少多版本行?
我们想测量pg_dump对生产数据库的影响,并在需要时暂停它:它是否创建了太多的多版本行?
提前致谢
pg_dump不创建任何行版本(又名tuples)。
pg_dump
唯一的影响pg_dump是增加的 I/O 负载和它创建的长时间运行的事务。长事务将在转储期间防止 autovacuum 回收死元组。
通常这不是什么大问题,除非您在数据库中有非常高的写入活动。为了缓解这个问题,您可以创建一个流复制备用服务器,设置max_standby_streaming_delay为超过持续时间pg_dump并让pg_dump在那里运行。
max_standby_streaming_delay