Re: Parent/child context relation in pg_get_backend_memory_contexts() - Mailing list pgsql-hackers

From David Rowley
Subject Re: Parent/child context relation in pg_get_backend_memory_contexts()
Date
Msg-id CAApHDvqOJmTiSMxpheVcQuTKRefHJ5wFV0Oh9VtGbcE03Vfpdg@mail.gmail.com
Whole thread Raw
In response to Re: Parent/child context relation in pg_get_backend_memory_contexts()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 29 Jul 2024 at 04:31, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> It is not clear to me exactly which of these pointers should be
> presumed to be possibly-null, but certainly testing ident after
> storing through it is pretty pointless.  Maybe what was intended
> was
>
> -       if (ident && strcmp(*name, "dynahash") == 0)
> +       if (*name && strcmp(*name, "dynahash") == 0)

It should be *ident. I just missed adding the pointer dereference when
moving that code to a function.

Thanks for the report. I'll fix shortly.

David



pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: Pluggable cumulative statistics
Next
From: Tom Lane
Date:
Subject: Re: pg_upgrade failing for 200+ million Large Objects