Re: Add bump memory context type and use it for tuplesorts

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add bump memory context type and use it for tuplesorts
Date: 2024-02-20 23:29:04
Message-ID: CAApHDvo7+RMKCize+HhtbVqJyAcfn5R1cSs7P__Y8foDBt_DmQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 20 Feb 2024 at 23:52, Matthias van de Meent
<boekewurm+postgres(at)gmail(dot)com> wrote:
> What I meant was that
>
> > (char *) block + Bump_BLOCKHDRSZ
> vs
> > ((char *) block) + Bump_BLOCKHDRSZ
>
> , when combined with my little experience with pointer addition and
> precedence, and a lack of compiler at the ready at that point in time,
> I was afraid that "(char *) block + Bump_BLOCKHDRSZ" would be parsed
> as "(char *) (block + Bump_BLOCKHDRSZ)", which would get different
> offsets across the two statements.
> Godbolt has since helped me understand that both are equivalent.

I failed to notice this. I've made them the same regardless to
prevent future questions from being raised about the discrepancy
between the two.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michail Nikolaev 2024-02-20 23:33:26 Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements
Previous Message Michael Paquier 2024-02-20 23:22:22 Re: Injection points: some tools to wait and wake