Re: BUG #17163: spgist index scan statistics stays at 0 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17163: spgist index scan statistics stays at 0
Date
Msg-id 901541.1630104526@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17163: spgist index scan statistics stays at 0  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I wrote:
> The other index AMs do that during the first amgettuple or amgetbitmap
> call, but it doesn't look like there is any convenient way to duplicate
> that behavior in spgist; none of the code in or below spggettuple or
> spggetbitmap is explicitly aware of whether this is the first call.
> I'm inclined to propose adding the counter bump in spgrescan.  That
> isn't *exactly* equivalent semantics, but it would only matter if
> someplace called amrescan and then didn't follow through with a scan.
> The attached seems to behave as I'd expect.

I had a nagging feeling that we might have multiple amrescan calls
in some code paths, but after reviewing the commit log, it looks
like that stopped being an issue in 9.1 (commit d583f10b7).
So it should be okay to do it like this in supported branches.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17163: spgist index scan statistics stays at 0
Next
From: Alexander Lakhin
Date:
Subject: Re: BUG #17161: Assert failed on opening a relation that exists in two schemas via the LANGUAGE SQL function