Re: Why our Valgrind reports suck - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Why our Valgrind reports suck
Date
Msg-id CAMbWs496zyq77uGyX4Gh8xvLKq9ONQmgOUfUwA2wquLO3eZ_5w@mail.gmail.com
Whole thread Raw
In response to Re: Why our Valgrind reports suck  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Why our Valgrind reports suck
List pgsql-hackers
On Thu, Jul 10, 2025 at 3:40 AM Tom Lane <tgl@sss.pgh.pa.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



pgsql-hackers by date:

Previous
From: "cca5507"
Date:
Subject: Re: Small optimization with expanding dynamic hash table
Next
From: Amit Kapila
Date:
Subject: Re: Using failover slots for PG-non_PG logical replication