Re: Reducing the chunk header sizes on all memory context types

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>
Subject: Re: Reducing the chunk header sizes on all memory context types
Date: 2022-10-04 11:29:23
Message-ID: CAEudQAox56Y5orv8JCGdjK4msgn2odEcwVqOQL_RhCBEb8ZZRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em ter., 4 de out. de 2022 às 05:36, David Rowley <dgrowleyml(at)gmail(dot)com>
escreveu:

> On Tue, 4 Oct 2022 at 13:35, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
> > Revisiting my work on reducing memory consumption, I found this patch
> left out.
> > I'm not sure I can help.
> > But basically I was able to write and read the block size, in the chunk.
> > Could it be the case of writing and reading the context pointer in the
> same way?
> > Sure this leads to some performance loss, but would it make it possible
> to get the context pointer from the chunk?
> > In other words, would it be possible to save the context pointer and
> compare it later in MemoryContextContains?
>
> I'm not really sure I understand the intention of the patch. The
> header size for all our memory contexts was already reduced in
> c6e0fe1f2. The patch you sent seems to pre-date that commit.
>
There is zero intention to commit this. It's just an experiment I did.

As it is in the patch, it is possible to save the context pointer outside
the header chunk.
Making it possible to retrieve it in MemoryContextContains.

It's just an idea.

regards,
Ranier Vilela

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2022-10-04 12:15:16 Re: possibility of partial data dumps with pg_dump
Previous Message Ranier Vilela 2022-10-04 11:23:16 Re: Small miscellaneous fixes