We need to log aborted autovacuums

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема We need to log aborted autovacuums
Дата
Msg-id 4CE44D2D.2000309@agliodbs.com
обсуждение исходный текст
Ответы Re: We need to log aborted autovacuums  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: We need to log aborted autovacuums  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: We need to log aborted autovacuums  (Greg Smith <greg@2ndquadrant.com>)
Список pgsql-hackers
Hackers,

I've been trying to diagnose in a production database why certain tables
never get autovacuumed despite having a substantial % of updates.  The
obvious reason is locks blocking autovacuum from vacuuming the table ...
but the trick is we don't log such blocking behavior, at all.  This
means that there is no possible way for a user to figure out *why* his
tables aren't getting autovacuumed.

And yes, this is a common problem.  A quick survey on IRC found 3 active
users on channel (out of 20 or so) who'd encountered it.  The current
case I'm looking at is a table with over 70% bloat which hasn't been
autovacuumed since the database was upgraded a month ago.

What I'd like to do is add some logging code to autovacuum.c so that if
log_autovacuum is any value other than -1, failure to vacuum due to
locks gets logged.   Does this make sense?

And does anyone have suggestions on how users can diagnose this on older
versions?

--                                  -- Josh Berkus                                    PostgreSQL Experts Inc.
                        http://www.pgexperts.com
 


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Rollback sequence reset on TRUNCATE rollback patch
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: We need to log aborted autovacuums