[PATCH] Remove unused is_error parameter from TeardownHistoricSnapshot()

Started by 慈超云about 1 month ago2 messageshackers
Jump to latest
#1慈超云
cichaoyun@halodbtech.com

Hi hackers,

I found that the is_error parameter of the TeardownHistoricSnapshot() function is not actually used anywhere in the code.
This parameter was introduced in commit
b89e151054a05f0f6d356ca52e3b725dd0505e53 as part of the logical decoding feature, but has never been used. The function just sets two global pointers to NULL regardless of the parameter value.
So  I' ve submitted a patch to remove this unused parameter.

Please see the attached patch for details.

Best regards,

Chaoyun

杭州易景数通科技有限公司
慈超云

Attachments:

v1-0001-Subject-PATCH-Remove-unused-parameter-from-Teardo.patchapplication/octet-stream; charset=utf-8; name=v1-0001-Subject-PATCH-Remove-unused-parameter-from-Teardo.patchDownload+8-9
#2Daniel Gustafsson
daniel@yesql.se
In reply to: 慈超云 (#1)
Re: [PATCH] Remove unused is_error parameter from TeardownHistoricSnapshot()

On 6 Mar 2026, at 08:34, 慈超云 <cichaoyun@halodbtech.com> wrote:

Hi hackers,

I found that the is_error parameter of the TeardownHistoricSnapshot() function is not actually used anywhere in the code.
This parameter was introduced in commit
b89e151054a05f0f6d356ca52e3b725dd0505e53 as part of the logical decoding feature, but has never been used. The function just sets two global pointers to NULL regardless of the parameter value.

It is indeed unused, but given that it exists and the callers set it
appropriately it could be a pretty valuable debugging aid when attaching, or
adding logging, to TeardownHistoricSnapshot. Compilers are smart enough to
take care of this for us so there seems to be little value in removing this
(apart from silencing AI tools but that's not something we optimize for).

--
Daniel Gustafsson