public inbox for [email protected]
help / color / mirror / Atom feedFrom: Sivaprasad <[email protected]>
To: [email protected]
Subject: Pre-PG18 parallel scan estimation: accessing planned worker count from amestimateparallelscan()
Date: Thu, 25 Jun 2026 07:16:07 +0530
Message-ID: <CAHi-N2Fqs=7vUfNzDopsNnxB145kOz7FAOXofxw=gFSqaG_vrw@mail.gmail.com> (raw)
Hello,
While adding parallel scan support to the Biscuit
<https://github.com/CrystallineCore/Biscuit; index access method, I ran
into a question about the pre-PG18 parallel scan API.
Biscuit partitions scan work into a fixed number of segments at estimation
time and assigns those segments to parallel participants via a
shared-memory descriptor in the DSM segment. Because the segment layout
depends on the number of participants, we need the planned worker count
during amestimateparallelscan() — the only callback that both sizes the DSM
allocation and runs in the same process immediately before
aminitparallelscan().
The callback signatures across versions are:
-
-
PG16: Size (*)(void)
-
PG17: Size (*)(int nkeys, int norderbys)
-
PG18+: Size (*)(Relation, int *nworkers*, int nchunks)
In PG18+, nworkers is available directly. In PG16 and PG17 it is not.
My question: prior to PG18, was there any supported mechanism by which an
index AM could determine the planner's intended parallel worker count
during scan estimation?
Thanks,
Sivaprasad Murali
Biscuit index access method
view thread (2+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Pre-PG18 parallel scan estimation: accessing planned worker count from amestimateparallelscan()
In-Reply-To: <CAHi-N2Fqs=7vUfNzDopsNnxB145kOz7FAOXofxw=gFSqaG_vrw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox