Thread: Analyze on slave promoted.
Hi,
Is this necessary to run analyze on a slave using streaming replication after promotion??
Hi
čt 26. 9. 2019 v 9:55 odesílatel Joao Junior <jcoj2006@gmail.com> napsal:
Hi,Is this necessary to run analyze on a slave using streaming replication after promotion??
No - column statistics are come from master - and are persistent - promote change nothing.
Pavel
On 26/09/2019 09:54, Joao Junior wrote: > Hi, > Is this necessary to run analyze on a slave using streaming > replication after promotion?? > Yes, you should run ANALYZE on all of your tables in all of your databases after a promotion. The data distribution statistics are replicated, as Pavel mentioned, but other statistics are not. In particular, pg_stat_all_tables.n_dead_tup is not replicated and so autovacuum has no idea when it needs to run.