[HACKERS] Queuing all tables for analyze after recovery

Поиск
Список
Период
Сортировка
От Tomasz Ostrowski
Тема [HACKERS] Queuing all tables for analyze after recovery
Дата
Msg-id d3b859bc-210f-a92a-cecb-f70929713a72@ato.waw.pl
обсуждение исходный текст
Список pgsql-hackers
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 slow" after a 
failover of so called MultiAZ  databases (with fast automatic failover 
for double price). Funny that they send it for both PostgreSQL and 
Oracle databases, which, I suppose, confuses Oracle DBA's greatly.

And in AWS RDS MultiAZ a failover is pretty common. Minor version 
upgrade - failover. A storage hiccup - failover. Out of memory - failover.

Shouldn't this analyze be queued and all tables analyzed automatically 
after failover by autovacuum daemon? With up to autovacuum_max_workers 
in parallel?

It might save some DBA's from a couple of lost sleeping hours for sure. 
What do you think? A GUC option? On by dafault? Maybe even backported, 
but off by default in released versions?

-- 
Tomasz "Tometzky" Ostrowski


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: [HACKERS] WIP: BRIN bloom indexes
Следующее
От: Tomasz Ostrowski
Дата:
Сообщение: [HACKERS] Queuing all tables for analyze after recovery