Re: Add n_tup_newpage_upd to pg_stat table views

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add n_tup_newpage_upd to pg_stat table views
Date: 2023-03-23 00:14:08
Message-ID: CAH2-Wzn-rnj4U8sFwr0Tu0sGutwvuuWo8EXyCrPpUJ=LxYuthA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 17, 2023 at 3:22 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> I think that this is pretty close to being committable already.

Attached revision has some small tweaks by me. Going to commit this
revised version tomorrow morning.

Changes:

* No more dedicated struct to carry around the type of an update.

We just use two boolean arguments to the pgstats function instead. The
struct didn't seem to be adding much, and it was distracting to track
the information this way within heap_update().

* Small adjustments to the documentation.

Nearby related items were tweaked slightly to make everything fit
together a bit better. For example, the description of n_tup_hot_upd
is revised to make it obvious that n_tup_hot_upd counts row updates
that can never get counted under the new n_tup_newpage_upd counter.

--
Peter Geoghegan

Attachment Content-Type Size
v2-0001-Count-the-number-of-new-page-updates-in-pgstats.patch application/x-patch 13.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-03-23 00:14:39 Re: Add pg_walinspect function with block info columns
Previous Message Peter Geoghegan 2023-03-23 00:13:03 Re: Add pg_walinspect function with block info columns