Remove unused is_redo argument from pgstat_execute_transactional_drops()

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Remove unused is_redo argument from pgstat_execute_transactional_drops()
Date: 2026-10-29 04:47:51
Message-ID: 7B30D9B5-90FA-4184-85E5-60438DBE56CC@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While reviewing patches, I spotted that pgstat_execute_transactional_drops()’s third argument, “bool is_redo”, is unused.

I checked the file history. Looks like 8b1dccd3 introduced the function without a full implementation, then 5891c7a8 implemented the actual statistics deletion, but never used is_redo. There are only 4 call sites that pass either true or false, but the value has no effect, which may confuse code readers.

So, I propose this trivial patch to remove the unused argument is_redo. I have run “make check-world” and it passed.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

Attachment Content-Type Size
v1-0001-Remove-unused-is_redo-argument-from-pgstat_execut.patch application/octet-stream 3.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2026-10-29 04:57:51 Re: [PG19] pg_upgrade --check passes, then the upgrade fails
Previous Message Haibo Yan 2026-10-29 04:38:56 Re: ALTER COLUMN SET NOT NULL differ from ALTER TABLE ADD CONSTRAINT