Re: Analyze on slave promoted. - Mailing list pgsql-performance

From Vik Fearing
Subject Re: Analyze on slave promoted.
Date
Msg-id ba1c2d91-d1af-f704-7374-5f2ec771db38@2ndquadrant.com
Whole thread Raw
In response to Analyze on slave promoted.  (Joao Junior <jcoj2006@gmail.com>)
List pgsql-performance
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.




pgsql-performance by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Autovacuum is cleaning very less dead tuples
Next
From: Edilmar Alves
Date:
Subject: Re: Slow pg_publication_tables with many schemas and tables