pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: github@cquest.org
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17163: spgist index scan statistics stays at 0
Date: Fri, 27 Aug 2021 18:48:46 -0400
Message-ID: <901541.1630104526@sss.pgh.pa.us> (raw)
In-Reply-To: <862973.1630089184@sss.pgh.pa.us>
References: <17163-b8c5cc88322a5e92@postgresql.org>
	<862973.1630089184@sss.pgh.pa.us>

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





view thread (3+ messages)

Message-ID: <901541.1630104526@sss.pgh.pa.us>
Permalink:  ../901541.1630104526@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/901541.1630104526@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, github@cquest.org, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17163: spgist index scan statistics stays at 0
  In-Reply-To: <901541.1630104526@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox