Re: Displaying accumulated autovacuum cost

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Greg Smith <greg(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Displaying accumulated autovacuum cost
Date: 2011-11-26 01:10:51
Message-ID: CA+TgmoadM7k8scsW4t_LzLLaRGy79NckaX4+jXrWX_BjB7jOqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 25, 2011 at 11:39 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> I'm going to push this now anyway, thanks.

This patch adds a count of the number of buffers dirtied to VACUUM,
but it strikes me that it would be useful to add similar tracking to
pgBufferUsage. Attached is a patch for that. You can see the new
counters through pg_stat_statements or with EXPLAIN (ANALYZE,
BUFFERS). This is useful because the number of buffers that a query
*writes* doesn't necessarily have much to do with anything - it may
end up writing buffers dirtied by other queries while being read-only
itself, or conversely it may not write anything at all even though it
dirties quite a bit.

Thoughts? Comments? Objections?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
dirty_buffers.patch application/octet-stream 13.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2011-11-26 04:09:09 Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID
Previous Message Jeff Janes 2011-11-26 00:42:31 Re: Measuring relation free space