[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 s

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. One thing I'm unhappy about i

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 > pg_stat_all_tables is blank. Well, tha

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 out

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 whom? pg_statistic has exa

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 reliability guarantees as the rest

[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 s