Re: Support tid range scan in parallel?
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Pgsql Hackers <pgsql-hackers@postgresql.org>
Cc: Cary Huang <cary.huang@highgo.ca>, Junwang Zhao <zhjwpku@gmail.com>, Rafia Sabih <rafia.pghackers@gmail.com>
Date: 2025-11-27T13:31:05Z
Lists: pgsql-hackers
Attachments
- v1-0001-Fix-possibly-uninitialized-HeapScanDesc.rs_startb.patch (application/octet-stream)
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