Re: Parent/child context relation in pg_get_backend_memory_contexts()

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Parent/child context relation in pg_get_backend_memory_contexts()
Date: 2024-07-28 21:19:51
Message-ID: CAApHDvqOJmTiSMxpheVcQuTKRefHJ5wFV0Oh9VtGbcE03Vfpdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 29 Jul 2024 at 04:31, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-07-28 21:24:29 Re: pg_upgrade failing for 200+ million Large Objects
Previous Message Dmitry Dolgov 2024-07-28 20:03:56 Re: Pluggable cumulative statistics