Re: Improve explicit cursor handling in pg_stat_statements

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Sami Imseih <samimseih@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-01T23:42:41Z
Lists: pgsql-hackers
On Mon, Jun 30, 2025 at 03:37:08PM +0300, Sami Imseih wrote:
> rebased patch.

There were two extra pg_stat_statements_reset() calls added to
cursors.sql that were not necessary.  I have also cut by one the
number of FETCH queries with the numbers, as it does not change the
coverage outcome, tweaked a bit the comments, and the result looked
fine.  At the end, applied.
--
Michael

Commits

  1. Show sizes of FETCH queries as constants in pg_stat_statements