Remove unused is_redo argument from pgstat_execute_transactional_drops()

Started by Chao Li26 days ago3 messageshackers
Jump to latest
#1Chao Li
li.evan.chao@gmail.com

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/

Attachments:

t254435_1
v1-0001-Remove-unused-is_redo-argument-from-pgstat_execut.patchapplication/octet-stream; name=v1-0001-Remove-unused-is_redo-argument-from-pgstat_execut.patch; x-unix-mode=0644Download+6-7
#2Nathan Bossart
nathandbossart@gmail.com
In reply to: Chao Li (#1)
Re: Remove unused is_redo argument from pgstat_execute_transactional_drops()

On Thu, Oct 29, 2026 at 12:47:51PM +0800, Chao Li wrote:

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

Committed, thanks.

--
nathan

#3Chao Li
li.evan.chao@gmail.com
In reply to: Nathan Bossart (#2)
Re: Remove unused is_redo argument from pgstat_execute_transactional_drops()

On Oct 31, 2026, at 03:21, Nathan Bossart <nathandbossart@gmail.com> wrote:

On Thu, Oct 29, 2026 at 12:47:51PM +0800, Chao Li wrote:

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

Committed, thanks.

--
nathan

Hi Nathan,

Thanks a lot for committing.

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