Sample Header Ad - 728x90

pg_repack slows down PostgreSQL replication

1 vote
3 answers
1750 views
I have a master PostgreSQL 9.5 server and a standby server. For replication I use repmgr (WAL streaming). Typically the delay between master and standby is <5s: $ psql -t -c "SELECT extract(epoch from now() - pg_last_xact_replay_timestamp());" 0.044554 Periodically pg_repack is invoked on master in order to optimize indexes and tables. Repacking tables causes massive changes in WAL streaming and significantly slows down replication, so that the difference between master and standby could be more than 1h. Is there a way how to reduce such delay? Is it possible to synchronize newly incoming data with higher priority than repack changes?
Asked by Tombart (1160 rep)
Jan 31, 2017, 09:16 AM
Last activity: Apr 10, 2022, 06:10 AM