Further _bt_first simplifications for parallel index scans

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Further _bt_first simplifications for parallel index scans
Date: 2025-01-02 16:37:27
Message-ID: CAH2-Wz=XjUZjBjHJdhTvuH5MwoJObWGoM2RG2LyFg5WUdWyk=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Attached patch goes a bit further with simplifying _bt_first's
handling of seizing the parallel scan. This continues recent work from
commits 4e6e375b and b5ee4e52.

Aside from requiring less code, the new structure relieves _bt_first
from having separate calls to _bt_start_array_keys for the serial and
parallel cases. It also places emphasis on the idea that it's expected
that calls to _bt_first will go through _bt_readfirstpage (not
_bt_readnextpage). While it is of course possible for a parallel
scan's _bt_first to call _bt_readnextpage instead, that is the
exception, not the rule.

--
Peter Geoghegan

Attachment Content-Type Size
v1-0001-Simplify-_bt_first.patch application/octet-stream 4.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2025-01-02 16:49:13 Allow NOT VALID foreign key constraints on partitioned tables.
Previous Message Robert Treat 2025-01-02 16:25:28 Re: Doc: fix the rewrite condition when executing ALTER TABLE ADD COLUMN