Re: Support tid range scan in parallel? - Mailing list pgsql-hackers

From David Rowley
Subject Re: Support tid range scan in parallel?
Date
Msg-id CAApHDvo1swSL5R1-Z-eL70yErB6aujYNLZ4kud8XgHyh-cVW3w@mail.gmail.com
Whole thread Raw
In response to Re: Support tid range scan in parallel?  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Support tid range scan in parallel?
List pgsql-hackers
On Thu, 27 Nov 2025 at 18:48, David Rowley <dgrowleyml@gmail.com> wrote:
> This seems to have caused issues on skink [1] under Valgrind.  The
> problem seems to be that initscan() does not always initialise
> rs_startblock. I'm now trying to figure out if there's some reason for
> that, or if that's been overlooked at some point.

I've written the attached patch to address the uninitialised
rs_startblock field.

The patch basically adds:

if (!keep_startblock)
    scan->rs_startblock = InvalidBlockNumber;

to initscan() when in parallel mode. The rest of the patch is a small
refactor to make it clearer which parts are for parallel and which are
for serial. I also added a comment to mention that the syncscan start
location is figured out in table_block_parallelscan_startblock_init()
for parallel scans.

David

> [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2025-11-27%2002%3A17%3A35

Attachment

pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: https://cfbot.cputube.org - certificate has expired
Next
From: Bertrand Drouvot
Date:
Subject: Re: Remove unused function parameters, part 1: contrib