| From: | Japin Li <japinli(at)hotmail(dot)com> |
|---|---|
| To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Fix memory leak in gist_page_items() of pageinspect |
| Date: | 2025-12-19 09:36:51 |
| Message-ID: | MEAPR01MB3031EC6594C564509A37419EB6A9A@MEAPR01MB3031.ausprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, 19 Dec 2025 at 08:23, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
> Hi,
>
> On Fri, Dec 19, 2025 at 02:21:40PM +0800, Japin Li wrote:
>> On Fri, 19 Dec 2025 at 04:29, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>> > Yeah, and removing IS_INDEX() and adding a check for partitioned indexes would
>> > still mean 2 code paths. So, v2 changes the close calls (and that's consistent
>> > with what pgstatginindex_internal() is doing.
>> >
>>
>> It would be reasonable to add a comment explaining the choice of
>> relation_open()/relation_close() instead of the index-specific
>> index_open()/index_close().
>
> Yeah that would not hurt. What about before the relation_open() calls?
>
> "
> Use relation_open() and not index_open() to avoid the validate_relation_kind()
> check as we handle relation validation separately below.
> "
>
LGTM.
--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Japin Li | 2025-12-19 10:07:24 | Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect |
| Previous Message | Daniel Gustafsson | 2025-12-19 09:04:40 | Re: Fix typo 586/686 in atomics/arch-x86.h |