Re: Fix unsafe PlannedStmt access in pg_stat_statements

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix unsafe PlannedStmt access in pg_stat_statements
Date: 2026-05-11 08:11:45
Message-ID: agGPQdHqrsizsab7@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 11, 2026 at 04:07:29PM +0800, Chao Li wrote:
> However, commit 3357471cf9f5e470dfed0c7919bcf31c7efaf2b9 added a new
> access to pstmt after that point:
>
> The attached patch fixes this by saving pstmt->planOrigin, following
> the same pattern already used for queryId, stmt_location, and
> stmt_len.

That would be my business. Missing a patch attached perhaps?
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-05-11 09:07:46 Re: Proposal: Conflict log history table for Logical Replication
Previous Message Chao Li 2026-05-11 08:11:41 Re: Fix unsafe PlannedStmt access in pg_stat_statements