| From: | cca5507 <cca5507(at)qq(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Fix incorrect assertion in heapgettup_pagemode() |
| Date: | 2025-12-25 11:13:38 |
| Message-ID: | tencent_A84F3C810365BB9BD08442955AE494141907@qq.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 469397e7344..1229e22e78a 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -1077,7 +1077,7 @@ continue_page:
ItemId lpp;
OffsetNumber lineoff;
- Assert(lineindex <= scan->rs_ntuples);
+ Assert(lineindex < scan->rs_ntuples);
lineoff = scan->rs_vistuples[lineindex];
lpp = PageGetItemId(page, lineoff);
Assert(ItemIdIsNormal(lpp));
The lineindex is 0-based, so it should be '<' rather than '<=', thoughts?
--
Regards,
ChangAo Chen
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Fix-incorrect-assertion-in-heapgettup_pagemode.patch | application/octet-stream | 803 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Erik Wienhold | 2025-12-25 11:46:47 | Re: Regression with large XML data input |
| Previous Message | Alexander Korotkov | 2025-12-25 11:13:36 | Re: Implement waiting for wal lsn replay: reloaded |