From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Add n_tup_newpage_upd to pg_stat table views |
Date: | 2023-01-27 23:23:39 |
Message-ID: | CADkLM=ded21M9iZ36hHm-vj2rE2d=zcKpUQMds__Xm2pxLfHKA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
v1-0001-Add-n_tup_newpage_upd-to-pg_stat_all_tables-and-p.patch | text/x-patch | 12.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2023-01-27 23:28:14 | Re: heapgettup() with NoMovementScanDirection unused in core? |
Previous Message | Tom Lane | 2023-01-27 23:15:50 | Re: heapgettup() with NoMovementScanDirection unused in core? |