[HACKERS] Queuing all tables for analyze after recovery

2017-10-19 Thread Tomasz Ostrowski
Hi. Some (maybe all) row statistics are lost after the database has recovered after a failover. So it's recommended to ANALYZE all databases in a cluster after recovery. Amazon's AWS RDS (their managed SQL databases service) even sends an email "consider running analyze if your database is

Re: [HACKERS] Queuing all tables for analyze after recovery

2017-10-19 Thread Vik Fearing
On 10/19/2017 11:26 PM, Tom Lane wrote: > Vik Fearing writes: >> On 10/19/2017 10:54 PM, Tom Lane wrote: >>> Uh ... recommended by whom? pg_statistic has exactly the same reliability >>> guarantees as the rest of the system catalogs. > >> For data statistics, sure.

Re: [HACKERS] Queuing all tables for analyze after recovery

2017-10-19 Thread Tom Lane
Vik Fearing writes: > On 10/19/2017 10:54 PM, Tom Lane wrote: >> Uh ... recommended by whom? pg_statistic has exactly the same reliability >> guarantees as the rest of the system catalogs. > For data statistics, sure. One thing I'm unhappy about is that >

Re: [HACKERS] Queuing all tables for analyze after recovery

2017-10-19 Thread Tomasz Ostrowski
On 10/19/2017 10:54 PM, Tom Lane wrote: Uh ... recommended by whom? pg_statistic has exactly the same reliability guarantees as the rest of the system catalogs. Actually I'm not exactly sure what is lost and what is preserved. I'm pretty sure that pg_stat_all_tables and similar views turn

Re: [HACKERS] Queuing all tables for analyze after recovery

2017-10-19 Thread Vik Fearing
On 10/19/2017 10:54 PM, Tom Lane wrote: > Tomasz Ostrowski writes: >> Some (maybe all) row statistics are lost after the database has >> recovered after a failover. So it's recommended to ANALYZE all databases >> in a cluster after recovery. > > Uh ... recommended by

Re: [HACKERS] Queuing all tables for analyze after recovery

2017-10-19 Thread Tom Lane
Tomasz Ostrowski writes: > Some (maybe all) row statistics are lost after the database has > recovered after a failover. So it's recommended to ANALYZE all databases > in a cluster after recovery. Uh ... recommended by whom? pg_statistic has exactly the same

[HACKERS] Queuing all tables for analyze after recovery

2017-10-19 Thread Tomasz Ostrowski
Hi. Some (maybe all) row statistics are lost after the database has recovered after a failover. So it's recommended to ANALYZE all databases in a cluster after recovery. Amazon's AWS RDS (their managed SQL databases service) even sends an email "consider running analyze if your database is