pg_stat_statements: add missing tests for nesting_level

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: pg_stat_statements: add missing tests for nesting_level
Date: 2026-01-21 00:08:14
Message-ID: CAA5RZ0uK1PSrgf52bWCtDpzaqbWt04o6ZA7zBm6UQyv7vyvf9w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While looking at pg_stat_statements nesting_level, I realized that there
are missing nesting_level tests for pgss_planner and pgss_ExecutorFinish.
That is, if you remove nesting_level++ and nesting_level-- in those 2 hooks,
the tests will still succeed.

For pgss_planner the nesting_level updates missing tests are the ones
when track_planning is enabled.

Attached is a quick patch to add coverage.

--
Sami Imseih
Amazon Web Services (AWS)

Attachment Content-Type Size
v1-0001-pg_stat_statements-Add-missing-tests-for-nested-s.patch application/octet-stream 5.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2026-01-21 00:23:21 Re: pg_stat_statements: Fix nested tracking for implicitly closed cursors
Previous Message Michael Paquier 2026-01-21 00:00:51 Re: Extended Statistics set/restore/clear functions.