From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix inconsistency with HeapTuple freeing in extended_stats_funcs
Date: Fri, 06 Mar 2026 06:05:22 +0000
Message-ID: <E1vyOJO-002d97-24@gemulon.postgresql.org> (raw)
Fix inconsistency with HeapTuple freeing in extended_stats_funcs.c
heap_freetuple() is a thin wrapper doing a pfree(), and the function
import_pg_statistic(), introduced by ba97bf9cb7b4, had the idea to call
directly pfree() rather than the "dedicated" heap tuple routine.
upsert_pg_statistic_ext_data already uses heap_freetuple(). This code
is harmless as-is, but let's be consistent across the board.
Reported-by: Yonghao Lee <yonghao_lee@qq.com>
Discussion: https://postgr.es/m/tencent_CA1315EE8FB9C62F742C71E95FAD72214205@qq.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d5ea206728de7cb301d2f572055a76d4ea43bc8d
Modified Files
--------------
src/backend/statistics/extended_stats_funcs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix inconsistency with HeapTuple freeing in extended_stats_funcs
In-Reply-To: <E1vyOJO-002d97-24@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox