=?utf-8?Q?=C3=81lvaro?= Herrera writes:
> On 2025-May-08, Tom Lane wrote:
>> So it seems like valgrind is wrong here, or else we're leaking the
>> whole rd_att structure later on somehow.
> Well, the problem is that if num_check is zero, FreeTupleDesc() doesn't
> free ->check.
Ah-hah.
> Done th
On 2025-May-08, Tom Lane wrote:
> Uh ... yeah it is, down at the bottom of the function:
>
> /* Install array only after it's fully valid */
> relation->rd_att->constr->check = check;
> relation->rd_att->constr->num_check = found;
>
> So it seems like valgrind is wrong here, or
On Thu, May 8, 2025 at 6:17 PM Álvaro Herrera wrote:
> On 2025-05-08, Yasir wrote:
>
> > I believe that the valgrind should not report any memory leaks in such
> > simple/common commands. What am I doing wrong here?
>
> Hmm, that function was modified relatively recently so I think you found a
>
On 2025-May-08, Tom Lane wrote:
> Alvaro seems to think CheckNNConstraintFetch is worth taking
> a second look at, and maybe he's right, but the amount of
> storage involved there seems unexciting too.
Yeah, I think the new issue here is that we're calling that function at
all; previously we woul
=?utf-8?Q?=C3=81lvaro?= Herrera writes:
> If the table doesn't have check constraints, we end up doing
> MemoryContextAllocZero() with size 0 in CacheMemoryContext, which isn't
> great (IIUC we innecessarily allocate a chunk of size 8 in this case).
> I think we should make the allocation conditio
On Thu, May 8, 2025 at 7:27 PM Tom Lane wrote:
> Yasir writes:
> > I believe that the valgrind should not report any memory leaks in such
> > simple/common commands. What am I doing wrong here?
>
> I think you are vastly overestimating both the intelligence of
> valgrind, and our level of concer
Yasir writes:
> I believe that the valgrind should not report any memory leaks in such
> simple/common commands. What am I doing wrong here?
I think you are vastly overestimating both the intelligence of
valgrind, and our level of concern about minor one-time leaks.
Most of these are probably not
On 2025-05-08, Yasir wrote:
> I believe that the valgrind should not report any memory leaks in such
> simple/common commands. What am I doing wrong here?
Hmm, that function was modified relatively recently so I think you found a
genuine bug, which is probably mine. I'll have a look ...
--
Ál
Hi Yasir
> I ran a postgres server with valgrind looking for memory leaks at a
> particular extension, but I am experiencing something strange. Here are the
> steps:
> [...]
> 5. Question:
>
> I believe that the valgrind should not report any memory leaks in such
> simple/commo