pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Melanie Plageman <melanieplageman@gmail.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Andres Freund <andres@anarazel.de>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Nazir Bilal Yavuz <byavuz81@gmail.com>
Subject: Re: BitmapHeapScan streaming read user and prelim refactoring
Date: Sat, 06 Apr 2024 10:59:07 -0400
Message-ID: <1939305.1712415547@sss.pgh.pa.us> (raw)
In-Reply-To: <20240406134011.hjo3e2336sgcghfp@liskov>
References: <20240327193750.3mlcmzqondpj27xe@liskov>
	<7e98781c-34e0-4c02-8e5b-0500aa074271@enterprisedb.com>
	<CA+hUKGJtm_gkmW_h_02-Q9ZRcG3yOx2uzVqbCTfz7YPnTfs+DA@mail.gmail.com>
	<8330278b-9615-4030-8626-51ce714a7f54@enterprisedb.com>
	<20240331154551.lty4mundyoyhtixw@liskov>
	<20240403225759.sq5hmxdmbalroosy@liskov>
	<95d9471f-ead4-4215-b739-f6d6f4c19497@enterprisedb.com>
	<20240405080634.d7c23f46xjhhxf5q@liskov>
	<20240405235330.v4didvweb6isodtk@liskov>
	<a76f657a-5ce9-4467-b832-356c881db981@enterprisedb.com>
	<20240406134011.hjo3e2336sgcghfp@liskov>

Melanie Plageman <melanieplageman@gmail.com> writes:
> On Sat, Apr 06, 2024 at 02:51:45AM +0200, Tomas Vondra wrote:
>> * The one question I'm somewhat unsure about is why Tom chose to use the
>> "wrong" recheck flag in the 2017 commit, when the correct recheck flag
>> is readily available. Surely that had a reason, right? But I can't think
>> of one ...

> See above.

Hi, I hadn't been paying attention to this thread, but Melanie pinged
me off-list about this question.  I think it's just a flat-out
oversight in 7c70996eb.  Looking at the mailing list thread
(particularly [1][2]), it seems that Alexander hadn't really addressed
the question of when to prefetch at all, but just skipped prefetch if
the current page was skippable:

+		/*
+		 * If we did not need to fetch the current page,
+		 * we probably will not need to fetch the next.
+		 */
+		return;

It looks like I noticed that we could check the appropriate VM bits,
but failed to notice that we could easily check the appropriate
recheck flag as well.  Feel free to change it.

			regards, tom lane

[1] https://www.postgresql.org/message-id/a6434d5c-ed8d-b09c-a7c3-b2d1677e35b3%40postgrespro.ru
[2] https://www.postgresql.org/message-id/5974.1509573988%40sss.pgh.pa.us





view thread (248+ messages)  latest in thread

Message-ID: <1939305.1712415547@sss.pgh.pa.us>
Permalink:  ../1939305.1712415547@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1939305.1712415547@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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, melanieplageman@gmail.com, tomas.vondra@enterprisedb.com, thomas.munro@gmail.com, hlinnaka@iki.fi, andres@anarazel.de, byavuz81@gmail.com
  Subject: Re: BitmapHeapScan streaming read user and prelim refactoring
  In-Reply-To: <1939305.1712415547@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