From: | Sami Imseih <samimseih(at)gmail(dot)com> |
---|---|
To: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
Cc: | Aleksander Alekseev <aleksander(at)timescale(dot)com>, Konstantin Knizhnik <knizhnik(at)garret(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: New criteria for autovacuum |
Date: | 2025-04-03 22:21:02 |
Message-ID: | CAA5RZ0t1U38qtVAmg3epjh5RBbpT4VRB_Myfp0oGm_73w-UNRA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> I think this enables us to update the VM
> during on-access pruning. This is something I plan to work on in 19.
> It seems like it would alleviate situations like this.
IMO, index-only scans hitting the heap have always caught users off guard,
especially because scan performance fluctuates between good and bad.
Reducing this performance volatility is a great improvement.
> > As far as extra metrics go for the scenario in which and index only scan must
> > visit a table, pg_stat_all_indexes and pg_stat_all_tables do have a
> > idx_tup_fetch
> > counter which increases anytime an index scan visits the table, i.e.
> > index-only scan
> > with heap fetches or a regular index scan. I think having a counter
> > specifically for
> > heap fetches due to index-only scans could be valuable.
>
> What do you imagine using the heap fetches during index-only scans counter for?
A user can only determine that they are using index-only scans through EXPLAIN,
which limits visibility. It would be beneficial to provide additional
metrics to
support autovacuum/vacuum tuning for workloads that rely on index-only scans
and require them to be as efficient as possible.
Currently, pg_stat_all_tables/indexes displays the number of index scans,
but it would also be helpful to show the number of index-only scans
specifically,
along with "heap fetches". This would help in identifying the "heap
fetches" issue
and confirming whether vacuum tuning had any impact to reduce "heap fetches".
The existing indx_tup_fetch combines heap fetches from normal and
index-only scans,
so it could be useful but not perfect for this task.
--
Sami Imseih
Amazon Web Services (AWS)
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2025-04-03 22:23:40 | Re: Statistics Import and Export |
Previous Message | Tom Lane | 2025-04-03 21:40:41 | Re: Expand applicability of aggregate's sortop optimization |