Re: Adding skip scan (including MDAM style range skip scan) to nbtree - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Adding skip scan (including MDAM style range skip scan) to nbtree
Date
Msg-id CAH2-Wznbf4X-rJWGReTCKtA8U0+j0A6mkjx1oRU5FrmYN00p2A@mail.gmail.com
Whole thread Raw
In response to Re: Adding skip scan (including MDAM style range skip scan) to nbtree  (Alena Rybakina <a.rybakina@postgrespro.ru>)
List pgsql-hackers
On Tue, Mar 18, 2025 at 9:37 AM Alena Rybakina
<a.rybakina@postgrespro.ru> wrote:
> Sorry, I figured it out. The Assert was added to avoid misuse of the function to reinitialize memory and to ensure
thatit happens when parallel_aware is positive. 

Yeah. The assertion is supposed to suggest "don't worry, I didn't
forget to test parallel_aware in this function
[ExecIndexScanReInitializeDSM or ExecIndexScanReInitializeDSM], it's
just that I expect to not be called unless parallel_aware is true".

An alternative approach would have been to explicitly handle
parallel_aware=false in ExecIndexScanReInitializeDSM and
ExecIndexScanReInitializeDSM: they could just return false. That would
make ExecIndexScanReInitializeDSM and ExecIndexScanReInitializeDSM
more consistent with other nearby functions (in nodeIndexScan.c and
nodeIndexOnlyScan.c), at the cost of making the calling code (in
execParallel.c) less consistent. I really don't think that that
alternative is any better to what I actually did (I actually
considered doing things this way myself at one point), though it also
doesn't seem worse. So I'm inclined to do nothing about it now.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: pg_recvlogical requires -d but not described on the documentation
Next
From: Robert Haas
Date:
Subject: Re: making EXPLAIN extensible