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

From Robert Haas
Subject Re: Parent/child context relation in pg_get_backend_memory_contexts()
Date
Msg-id CA+TgmoY-2xTnEtoRzY_u4HMNeQQuRkR8EGXsYN-ggk2xboiomA@mail.gmail.com
Whole thread Raw
In response to Re: Parent/child context relation in pg_get_backend_memory_contexts()  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Parent/child context relation in pg_get_backend_memory_contexts()
List pgsql-hackers
On Fri, Jul 5, 2024 at 4:06 AM David Rowley <dgrowleyml@gmail.com> wrote:
> I've been wondering about the order of the "path" column.  When we
> talked, I had in mind that the TopMemoryContext should always be at
> the end of the array rather than the start, but I see you've got it
> the other way around.

FWIW, I would have done what Melih did. A path normally is listed in
root-to-leaf order, not leaf-to-root.

> I also imagined "path" would be called "context_ids". I thought that
> might better indicate what the column is without consulting the
> documentation.

The only problem I see with this is that it doesn't make it clear that
we're being shown parentage or ancestry, rather than values for the
current node. I suspect path is fairly understandable, but if you
don't like that, what about parent_ids?

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Parent/child context relation in pg_get_backend_memory_contexts()
Next
From: Nathan Bossart
Date:
Subject: Re: improve predefined roles documentation