Re: An oversight in ExecInitAgg for grouping sets - Mailing list pgsql-hackers

From David Rowley
Subject Re: An oversight in ExecInitAgg for grouping sets
Date
Msg-id CAApHDvrdnkhA4qFVSb0he0VWNEhmosQvNraOGFqh86O1fE1pcA@mail.gmail.com
Whole thread Raw
In response to Re: An oversight in ExecInitAgg for grouping sets  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Mon, 9 Jan 2023 at 22:21, David Rowley <dgrowleyml@gmail.com> wrote:
> One extra thing I noticed was that I had to add a new
> VALGRIND_MAKE_MEM_DEFINED in AllocSetAlloc when grabbing an item off
> the freelist. I didn't quite manage to figure out why that's needed as
> when we do AllocSetFree() we don't mark the pfree'd memory with
> NOACCESS, and it also looks like AllocSetReset() sets the keeper
> block's memory to NOACCESS, but that function also clears the
> freelists too, so the freelist chunk is not coming from a recently
> reset context.

It seems I didn't look hard enough for NOACCESS marking. It's in
wipe_mem(). So that explains why the VALGRIND_MAKE_MEM_DEFINED is
required in AllocSetAlloc.

Since this patch really only touches Valgrind macros, I don't really
feel like there's a good reason we can't still do this for v16, but
I'll start another thread to increase visibility to see if anyone else
thinks differently about that.

David



pgsql-hackers by date:

Previous
From: Emre Hasegeli
Date:
Subject: Re: Unnecessary confirm work on logical replication
Next
From: Dave Page
Date:
Subject: Re: When to drop src/tools/msvc support