| From: | Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com> |
|---|---|
| To: | shihao zhong <zhong950419(at)gmail(dot)com> |
| Cc: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] pg_surgery: check the page header and line pointers |
| Date: | 2026-09-07 14:18:51 |
| Message-ID: | CAMm1aWYM535aaBhzKGe7Cwh742eW5ja5Vtg6=Zq28CfyVGsajg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Shihao,
I reviewed the v3 patch, and it looks good to me. I have one optional
thought about the malformed line-pointer test:
Depending on the platform’s bit-field ordering, the encoded word may
produce an lp_off of either 32767 or 100. Since both values can be
misaligned on a build with 8-byte MAXALIGN, the condition may
short-circuit at the alignment check without exercising the
page-boundary checks. Would it make sense to use aligned values such
as 32736 and 128, so that either bit-field interpretation reaches a
boundary check? This is not a correctness issue with the patch, just a
possible way to make the test more targeted.
Otherwise, the patch looks good to me.
Best Regards,
Nitin Jadhav
Azure Database for PostgreSQL
Microsoft
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nick Ivanov | 2026-09-07 14:19:40 | Re: Possible race condition in pg_basebackup |
| Previous Message | Matthias van de Meent | 2026-09-07 13:58:59 | Re: Reducing relcache memory usage: deduping index shapes |