From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Count SP-GiST index scans in pg_stat statistics. |
Date: | 2021-08-27 23:53:28 |
Message-ID: | E1mJlf6-00088J-VW@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Count SP-GiST index scans in pg_stat statistics.
Somehow, spgist overlooked the need to call pgstat_count_index_scan().
Hence, pg_stat_all_indexes.idx_scan and equivalent columns never
became nonzero for an SP-GiST index, although the related per-tuple
counters worked fine.
This fix works a bit differently from other index AMs, in that the
counter increment occurs in spgrescan not spggettuple/spggetbitmap.
It looks like this won't make the user-visible semantics noticeably
different, so I won't go to the trouble of introducing an is-this-
the-first-call flag just to make the counter bumps happen in the
same places.
Per bug #17163 from Christian Quest. Back-patch to all supported
versions.
Discussion: https://postgr.es/m/17163-b8c5cc88322a5e92@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3778bcb39a94a3b6a821fd60fcd9919a95725e78
Modified Files
--------------
src/backend/access/spgist/spgscan.c | 4 ++++
1 file changed, 4 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-08-27 23:53:29 | pgsql: Count SP-GiST index scans in pg_stat statistics. |
Previous Message | Stephen Frost | 2021-08-27 23:23:53 | pgsql: Use maintenance_io_concurrency for ANALYZE prefetch |