Vacuum full stats reporting

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Vacuum full stats reporting
Date: 2017-04-10 08:36:51
Message-ID: CABUevEwkMTi3JwQ1peu2RQjt-rK4EJLbaXE1=mxiy1DUjWiRLw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Right now, VACUUM FULL are not reported in pgstat. That seems bad:ish. I
can see two reasonable ways to proceed:

1. Start reporting VACUUM FULL as regular vacuums, so they count up
vacuum_count and last_vacuum in pg_stat_*_tables.

2. Create a new set of counters for CLUSTER and VACUUM FULL (which are
arguably the same in this regard, in how they behave wrt the system), and
add counters cluster_count and last_cluster in pg_stat_*_tables.

Option 2 clearly adds more information and I can see quite a few cases
where this would be useful. But what do people think of the potential
overhead there? Worth it?

Due to this, it also does not (AFAICT) reset the counters for things like
dead tuples. This part seems like a pure bug. Perhaps we should at least do
something like (1) as a backpatch, even if we decide to do (2) in future
versions (11+ i guess)?

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2017-04-10 08:47:08 Re: [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.
Previous Message Heikki Linnakangas 2017-04-10 08:27:33 Re: SCRAM authentication, take three