Re: pgsql: Introduce pg_shmem_allocations_numa view - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: pgsql: Introduce pg_shmem_allocations_numa view
Date
Msg-id aFubIxuntEaPeO2t@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: pgsql: Introduce pg_shmem_allocations_numa view  (Tomas Vondra <tomas@vondra.me>)
List pgsql-hackers
Hi,

On Tue, Jun 24, 2025 at 10:32:25PM +0200, Tomas Vondra wrote:
> 
> Attached is a minor tweak of the valgrind suppresion rules,

Thanks!

> to add the
> two places touching the memory. I was hoping I could add a single rule
> for pg_numa_touch_mem_if_required, but that does not work - it's a
> macro, not a function. So I had to add one rule for both functions,
> querying the NUMA. That's a bit disappointing, because it means it'll
> hide all other failues (of Memcheck:Addr8 type) in those functions.
>

Shouldn't we add 2 rules for Memcheck:Addr4 too?

> Perhaps it'd be be better to turn pg_numa_touch_mem_if_required into a
> proper (inlined) function, at least with USE_VALGRIND defined.

Yeah I think that's probably better to reduce the scope to what we really want to.

> Something
> like the v2 patch -

yeah, maybe:

- add a rule for Memcheck:Addr4?
- have the same parameters name for the macro and the function?

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly
Next
From: Bertrand Drouvot
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart