Add n_tup_newpage_upd to pg_stat table views - Mailing list pgsql-hackers

From Corey Huinker
Subject Add n_tup_newpage_upd to pg_stat table views
Date
Msg-id CADkLM=ded21M9iZ36hHm-vj2rE2d=zcKpUQMds__Xm2pxLfHKA@mail.gmail.com
Whole thread Raw
Responses Re: Add n_tup_newpage_upd to pg_stat table views
Re: Add n_tup_newpage_upd to pg_stat table views
List pgsql-hackers
This patch adds the n_tup_newpage_upd to all the table stat views.

Just as we currently track HOT updates, it should be beneficial to track updates where the new tuple cannot fit on the existing page and must go to a different one.

Hopefully this can give users some insight as to whether their current fillfactor settings need to be adjusted.

My chosen implementation replaces the hot-update boolean with an update_type which is currently a three-value enum. I favored that only slightly over adding a separate newpage-update boolean because the two events are mutually exclusive and fewer parameters is less overhead and one less assertion check. The relative wisdom of this choice may not come to light until we add a new measurement and see whether that new measurement overlaps either is-hot or is-new-page.



Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: heapgettup() with NoMovementScanDirection unused in core?
Next
From: David Rowley
Date:
Subject: Re: heapgettup() with NoMovementScanDirection unused in core?