| From: | shihao zhong <zhong950419(at)gmail(dot)com> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Baji Shaik <baji(dot)pgdev(at)gmail(dot)com>, Greg Burd <greg(at)burd(dot)me> |
| Subject: | Re: [PATCH] pageinspect: validate line pointers before using them |
| Date: | 2026-12-04 04:06:11 |
| Message-ID: | CAGRkXqQ1zTNF_ZrhKnf63Sp4=maOOUtm_-G8cmUKdPphPATvNg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Zsolt,
Thanks for the review, and thanks Baji for testing v6.
1. Yes. Each function should check only what it uses. v6 wrongly
rejects your heap page.
2. I agree it is fragile. Your 3.b case shows it already. My check
uses att_align_pointer(), but index_deform_tuple() now aligns varlenas
differently. So the two disagree on a bad tuple. I will drop these
helpers.
3.a This is in decode_varbyte() itself. Sehrope's thread has a core
fix:
https://postgr.es/m/CAH7T-aoyWXh1GDZRJg5AzG_sAmUnvPdWoV9ybW+EA5VP=hMwmw@mail.gmail.com
3.b This also crashes on master, inside index_deform_tuple(). I don't
think pageinspect should try to catch it.
3.c This is a gap in the existing special space check. I will fix it.
So v7 would keep only the line pointer checks in 0001, plus the 3.c
fix. Does that sound reasonable?
Thanks,
Shihao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-12-04 04:21:36 | Re: pg_walinspect: add functions to locate and list WAL by time and LSN |
| Previous Message | shveta malik | 2026-12-04 03:58:39 | Re: Show the conflict log table in \dRs+ output |