pgsql: Suppress complaints about leaks in function cache loading.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Suppress complaints about leaks in function cache loading.
Date: 2025-08-03 02:00:50
Message-ID: E1uiO1p-000SoD-2y@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Suppress complaints about leaks in function cache loading.

PL/pgSQL and SQL-function parsing leak some stuff into the long-lived
function cache context. This isn't really a huge practical problem,
since it's not a large amount of data and the cruft will be recovered
if we have to re-parse the function. It's not clear that it's worth
working any harder than the previous patch did to eliminate these
leak complaints, so instead silence them with a suppression rule.

This suppression rule also hides the fact that CachedFunction structs
are intentionally leaked in some cases because we're unsure if any
fn_extra pointers remain. That might be nice to do something about
eventually, but it's not clear how.

Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Discussion: https://postgr.es/m/285483.1746756246@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2c7b4ad24dda86a73d80df063e9a56c3ecb1e4bb

Modified Files
--------------
src/tools/valgrind.supp | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-08-03 17:01:59 pgsql: Take a little more care in set_backtrace().
Previous Message Fujii Masao 2025-08-03 01:55:01 pgsql: Fix assertion failure in pgbench when handling multiple pipeline