Re: Why our Valgrind reports suck

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Why our Valgrind reports suck
Date: 2025-07-10 03:05:25
Message-ID: CAMbWs496zyq77uGyX4Gh8xvLKq9ONQmgOUfUwA2wquLO3eZ_5w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 10, 2025 at 3:40 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Now that v19 development is open, I'd like to get this work
> pushed sooner rather than later, before the patches bit-rot
> too much, and so that we can get started on follow-on work
> to remove remaining leaks. Does anyone want to review it
> further?

I'm just skimming through the changes and happened to spot two minor
things.

In 0008:

if (pq_mq_handle != NULL)
+ {
shm_mq_detach(pq_mq_handle);
+ pfree(pq_mq_handle);
+ }
pq_mq_handle = NULL;

Maybe we could move "pq_mq_handle = NULL;" inside the if branch?
Though I see we're doing it in your way on master.

In 0015:

I noticed that we're freeing the list returned from
logicalrep_workers_find(). Should we do the same for the "workers"
list in AtEOXact_LogicalRepWorkers()?

This is very useful work; I hope we can get it in soon.

Thanks
Richard

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-07-10 03:19:07 Re: Using failover slots for PG-non_PG logical replication
Previous Message cca5507 2025-07-10 02:45:44 Re: Small optimization with expanding dynamic hash table