Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)
Date: 2025-02-17 22:44:32
Message-ID: CAH2-WzkjMM5KoDAsmd5wL9Eas63gx6jc6_fsZ_i2uM2ZNYHgow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 28, 2024 at 9:52 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Wed, Aug 28, 2024 at 9:49 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > > > I agree with this analysis. I don't see why IndexScanDesc would ever
> > > > be the right place for this.
> > >
> > > Then what do you think is the right place?
> >
> > The paragraph that I agreed with and quoted in my reply, and that you
> > then quoted in your reply to me, appears to me to address that exact
> > question.
>
> Are you talking about adding global counters, in the style of pgBufferUsage?
>
> Or are you talking about adding it to BTSO? If it's the latter, then
> why isn't that at least as bad? It's just the IndexScanDesc thing, but
> with an additional indirection.

I need more feedback about this. I don't understand your perspective here.

If I commit the skip scan patch, but don't have something like this
instrumentation in place, it seems quite likely that users will
complain about how opaque its behavior is. While having this
instrumentation isn't quite a blocker to committing the skip scan
patch, it's not too far off, either. I want to be pragmatic. Any
approach that's deemed acceptable is fine by me, provided it
implements approximately the same behavior as the patch that I wrote
implements.

Where is this state that tracks the number of index searches going to
live, if not in IndexScanDesc? I get why you don't particularly care
for that. But I don't understand what the alternative you favor looks
like.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2025-02-17 22:57:21 Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation
Previous Message Thomas Munro 2025-02-17 22:33:03 Re: Adding NetBSD and OpenBSD to Postgres CI