Planner chooses an index-only scan for an index AM without amcanreturn, and execution fails

Edit
ID 7410
Title Planner chooses an index-only scan for an index AM without amcanreturn, and execution fails
CI (CFBot) Summary
Stats (from CFBot) Patch version: v3, Patch count: 1, First patch: +16−1, All patches: +16−1
Tags Bugfix
Created 2026-10-08 10:42:25
Last modified 2026-10-08 10:42:25 (56 minutes ago)
Latest email 2026-08-24 19:42:59 (1 month ago)
Status
PG20-3 (2026-11-01 – 2026-11-30): Needs review
Target version
Authors Andrey Rachitskiy (a.rachitskiy)
Reviewers Become reviewer
Committer
Links
Emails
BUG #19638: Planner chooses an index-only scan for an index AM without amcanreturn, and execution fails
First at 2026-08-23 23:45:47 by PG Bug reporting form <noreply at postgresql.org>
Latest at 2026-08-24 19:42:59 by Manuel Reyes Bravo <manuelreyesbravo at gmail.com>
Latest attachment (v3-0002-Reject-index-only-scans-when-index-cannot-return.patch) at 2026-08-24 19:34:38 from Andrey Rachitskiy <pl0h0yp1 at gmail.com>
    Attachment (v3-0002-Reject-index-only-scans-when-index-cannot-return.patch) at 2026-08-24 19:34:38 from Andrey Rachitskiy <pl0h0yp1 at gmail.com> (Patch: No)
    Attachment (v2-0001-Reject-index-only-scans-when-the-AM-can-return-nothing.patch) at 2026-08-24 18:52:42 from Manuel Reyes Bravo <manuelreyesbravo at gmail.com> (Patch: Yes)
    Attachment (0002-Reject-index-only-scans-when-index-cannot-return.patch) at 2026-08-24 18:19:54 from Andrey Rachitskiy <pl0h0yp1 at gmail.com> (Patch: No)
    Attachment (nokeyam.tar.gz) at 2026-08-24 16:51:43 from Manuel Reyes Bravo <manuelreyesbravo at gmail.com> (Patch: No)
History
When Who What
2026-10-08 11:31:40 Andrey Rachitskiy (a.rachitskiy) Removed a.rachitskiy from reviewers
2026-10-08 11:31:35 Andrey Rachitskiy (a.rachitskiy) Added a.rachitskiy as reviewer
2026-10-08 10:42:25 Andrey Rachitskiy (a.rachitskiy) Attached mail thread 19638-277d0f73dfaeaec8@postgresql.org
2026-10-08 10:42:25 Andrey Rachitskiy (a.rachitskiy) Created patch record
Edit