Re: Adding some error context for lock wait failures - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Adding some error context for lock wait failures
Date
Msg-id 2952775.1760023359@sss.pgh.pa.us
Whole thread Raw
In response to Re: Adding some error context for lock wait failures  (Andres Freund <andres@anarazel.de>)
Responses Re: Adding some error context for lock wait failures
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> valgrind complains that there's a memory leak here:

> ==374853== 1,024 bytes in 1 blocks are definitely lost in loss record 1,257 of 1,459
> ==374853==    at 0xFD902A: palloc (mcxt.c:1389)
> ==374853==    by 0x101A3D6: initStringInfoInternal (stringinfo.c:45)
> ==374853==    by 0x101A46B: initStringInfo (stringinfo.c:99)
> ==374853==    by 0xD8CF32: waitonlock_error_callback (lock.c:2027)
> ==374853==    by 0xF916E2: errfinish (elog.c:510)

Hmm, that is interesting -- I'd expect error cleanup to deal with
that.  Did you happen to notice the exact repro case?  It's surely
easy enough to add a pfree, but I don't believe that other errcontext
callbacks are any more careful than this one.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Support getrandom() for pg_strong_random() source
Next
From: "Euler Taveira"
Date:
Subject: Re: Invalid pointer access in logical decoding after error